Skip to content

Commit 5e498fb

Browse files
committed
Move libraries links and change resolver format.
1 parent 592753f commit 5e498fb

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

src/pages/learn/index.mdx

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import { Callout } from "nextra/components"
66

77
GraphQL is a query language for your API, and a server-side runtime for executing queries using a type system you define for your data. The [GraphQL specification](https://spec.graphql.org/) was open-sourced in 2015 and has since been implemented in a variety of programming languages. GraphQL isn't tied to any specific database or storage engine—it is backed by your existing code and data.
88

9+
<Callout type="info">If you're already familiar with GraphQL and would like to read documentation on how to build a GraphQL service, then there are libraries to help you implement GraphQL in [many different languages](/community/tools-and-libraries/?tags=server). There are also many libraries available that allow [client applications to query existing GraphQL APIs](/community/tools-and-libraries/?tags=client).</Callout>
10+
911
## Describe your API with a type system
1012

1113
A GraphQL service is created by [defining types and their fields](/learn/schema/), and then writing a function for each field to [provide the required data](/learn/execution/). For example, a GraphQL service that tells you the name of a logged-in user might look like this:
@@ -23,16 +25,14 @@ type User {
2325
Along with functions for each field on each type:
2426

2527
```js
26-
Query: {
27-
me(obj, args, context, info) {
28-
return context.request.auth.user
29-
}
28+
// Provide data for the `me` field on the `Query` type
29+
function Query_me(obj, args, context, info) {
30+
return context.request.auth.user
3031
}
3132

32-
User: {
33-
name(obj, args, context, info) {
34-
return context.db.getUserFullName(obj.id)
35-
}
33+
// Provide data for the `name` field on the `User` type
34+
function User_name(obj, args, context, info) {
35+
return context.db.getUserFullName(obj.id)
3636
}
3737
```
3838

@@ -102,6 +102,4 @@ The examples in this guide are based on [a modified version of the SWAPI GraphQL
102102

103103
Now that you know some key GraphQL concepts, you're ready to learn about all of the different aspects of its [type system](/schema/).
104104

105-
If you're already familiar with GraphQL and would like to read documentation on how to build a GraphQL service, then there are libraries to help you implement GraphQL in [many different languages](/community/tools-and-libraries/?tags=server). There are also many libraries available that allow [client applications to query existing GraphQL APIs](/community/tools-and-libraries/?tags=client).
106-
107105
For an in-depth learning experience with practical tutorials, see [the available training courses](/community/resources/training-courses).

0 commit comments

Comments
 (0)