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: quickstart-with-apollo/README.md
+46-9Lines changed: 46 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,9 @@
10
10
11
11
## Quickstart
12
12
13
+
<!--
13
14
For more information on how to get started [refer to the full angular-apollo-instagram tutorial](https://www.graph.cool/docs/quickstart/angular-apollo-instagram/).
# Create a new service inside a directory called `server`
31
+
graphcool init server
30
32
```
31
33
32
-
This creates a GraphQL API for the following schema:
34
+
This created the following file structure in the current directory:
35
+
36
+
```
37
+
.
38
+
└── server
39
+
├── graphcool.yml
40
+
├── types.graphql
41
+
├── .graphcoolrc
42
+
└── src
43
+
├── hello.graphql
44
+
└── hello.js
45
+
```
46
+
47
+
### 3. Define data model
48
+
49
+
Next, you need to define your data model inside the newly created `types.graphql`-file.
50
+
51
+
Replace the current contents in `types.graphql` with the following type definition (you can delete the predefined `User` type):
33
52
34
53
```graphql
35
54
typePost {
55
+
id: ID!@isUnique
56
+
createdAt: DateTime!
57
+
updatedAt: DateTime!
36
58
description: String!
37
59
imageUrl: String!
38
60
}
39
61
```
40
62
41
-
### 3. Connect the app with your GraphQL API
63
+
### 4. Deploy the GraphQL server
64
+
65
+
You'renowreadytoputyourGraphcoolserviceintoproduction! Navigateintothe `server` directoryand [deploy](https://docs-next.graph.cool/reference/graphcool-cli/commands-aiteerae6l#graphcool-deploy) the service:
66
+
67
+
```sh
68
+
cdserver
69
+
graphcooldeploy
70
+
```
71
+
72
+
SavetheHTTPendpointforthe `SimpleAPI` fromtheoutput, you'll need it in the next step.
73
+
74
+
> **Note**: You can now test your GraphQL API inside a GraphQL playground. Simply type the `graphcool playground` command and start sending queries and mutations.
0 commit comments