You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guides/using-graphql-astro.md
+10-1Lines changed: 10 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -33,22 +33,31 @@ Do you plan to write TypeScript?
33
33
Liftoff confirmed. Explore your project!
34
34
```
35
35
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).
37
37
38
38
```
39
39
cd astro-project-folder
40
40
npm run dev
41
41
```
42
42
43
+
:::tip
44
+
If the installation was successful, your project will be available at [http://localhost:4321/](http://localhost:4321/).
45
+
:::
46
+
43
47
## Connect to GraphQL
44
48
45
49
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.
46
50
47
51
Create a new file at `src/graphql.js` with the following content:
48
52
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
+
49
57
```js
50
58
classGraphQL {
51
59
60
+
// Change this url to match your Coilpack installation's APP_URL
0 commit comments