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: src/content/learn/Introduction.md
+16-7Lines changed: 16 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -7,11 +7,18 @@ permalink: /learn/
7
7
next: /learn/queries/
8
8
---
9
9
10
-
> Learn about GraphQL, how it works, and how to use it in this series of articles. Looking for documentation on how to build a GraphQL service? There are libraries to help you implement GraphQL in [many different languages](/code/). For an in-depth learning experience with practical tutorials, visit the [How to GraphQL](https://www.howtographql.com) fullstack tutorial website. We have also partnered with edX to create a free online course, [Exploring GraphQL: A Query Language for APIs](https://www.edx.org/course/exploring-graphql-a-query-language-for-apis).
10
+
> Learn about GraphQL, how it works, and how to use it. Looking for documentation on how to build a GraphQL service?
11
+
> There are libraries to help you implement GraphQL in [many different languages](/code/). For an in-depth learning experience
12
+
> with practical tutorials, see [How to GraphQL](https://www.howtographql.com). Check out the
13
+
> free online course,
14
+
> [Exploring GraphQL: A Query Language for APIs](https://www.edx.org/course/exploring-graphql-a-query-language-for-apis).
11
15
12
-
GraphQL is a query language for your API, and a server-side runtime for executing queries by using a type system you define for your data. GraphQL isn't tied to any specific database or storage engine and is instead backed by your existing code and data.
16
+
GraphQL is a query language for your API, and a server-side runtime for executing queries using a type system you define for your
17
+
data. GraphQL isn't tied to any specific database or storage engine and is instead backed by your existing code and data.
13
18
14
-
A GraphQL service is created by defining types and fields on those types, then providing functions for each field on each type. For example, a GraphQL service that tells us who the logged in user is (`me`) as well as that user's name might look something like this:
19
+
A GraphQL service is created by defining types and fields on those types, then providing functions for each field on each type.
20
+
For example, a GraphQL service that tells you who the logged in user is (`me`) as well as that user's name might look
21
+
like this:
15
22
16
23
```graphql
17
24
typeQuery {
@@ -36,9 +43,11 @@ function User_name(user) {
36
43
}
37
44
```
38
45
39
-
Once a GraphQL service is running (typically at a URL on a web service), it can receive GraphQL queries to validate and execute. A received query is first checked to ensure it only refers to the types and fields defined, then runs the provided functions to produce a result.
46
+
After a GraphQL service is running (typically at a URL on a web service), it can receive GraphQL queries to validate and execute.
47
+
The service first checks a query to ensure it only refers to the types and fields defined, and then runs the provided functions
48
+
to produce a result.
40
49
41
-
For example the query:
50
+
For example, the query:
42
51
43
52
```graphql
44
53
{
@@ -48,7 +57,7 @@ For example the query:
48
57
}
49
58
```
50
59
51
-
Could produce the JSON result:
60
+
Could produce the following JSON result:
52
61
53
62
```json
54
63
{
@@ -58,4 +67,4 @@ Could produce the JSON result:
58
67
}
59
68
```
60
69
61
-
Learn more about GraphQL — the query language, type system, how the GraphQL service works, as well as best practices for using GraphQL in the articles written in this section; they help to solve common problems.
0 commit comments