Skip to content

Commit cdcc7f6

Browse files
committed
Improve Astro GraphQL guide
1 parent fc9ef0a commit cdcc7f6

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

docs/guides/using-graphql-astro.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,22 +33,31 @@ Do you plan to write TypeScript?
3333
Liftoff confirmed. Explore your project!
3434
```
3535

36-
Once the installation is complete you can change into the Astro project directory and start the live reload development server.
36+
Once the installation is complete you can change into the Astro project directory and [start the live reload development server](https://docs.astro.build/en/install-and-setup/#start-the-astro-dev-server).
3737

3838
```
3939
cd astro-project-folder
4040
npm run dev
4141
```
4242

43+
:::tip
44+
If the installation was successful, your project will be available at [http://localhost:4321/](http://localhost:4321/).
45+
:::
46+
4347
## Connect to GraphQL
4448

4549
After we install Astro we are going to create a helper class to run our GraphQL queries through. Astro is extremely flexible so you can handle this part in many different ways.
4650

4751
Create a new file at `src/graphql.js` with the following content:
4852

53+
:::caution
54+
Make sure you update the `static endpoint = '';` line below to point at your Coilpack site and the graphql endpoint (`/graphql` by default)
55+
:::
56+
4957
```js
5058
class GraphQL {
5159

60+
// Change this url to match your Coilpack installation's APP_URL
5261
static endpoint = 'http://coilpack-site-url.test/graphql';
5362

5463
static async query(query) {

0 commit comments

Comments
 (0)