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/source/resources/graphql-glossary.md
+82-37Lines changed: 82 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,52 +4,56 @@ description: A comprehensive list of important GraphQL words and acronyms
4
4
---
5
5
6
6
7
-
We have put together a glossary of words and acronyms that you might hear or come across frequently in GraphQL land. Every developer and GraphQL enthusiast should be able to easily look up a particular term here when referenced in specs, reference guides, READMEs and within a codebase.
7
+
When you start diving into the GraphQL ecosystem, you'll probably encounter some unfamiliar terms and phrases along the way. To help you on your journey, we've defined some of the most common GraphQL vocabulary here in this handy cheat sheet.
8
8
9
9
10
10
<h2id="Apollo">Apollo</h2>
11
-
<p>A set of tools for building GraphQL apps. Some of these tools are Apollo Client (best way to use GraphQL to build Client apps), Apollo Server (for building GraphQL servers), Engine (performance monitoring and tracing), etc.</p>
11
+
<p>An open-source implementation of GraphQL that helps you manage data between the cloud and your UI. The Apollo platform is pluggable into your existing architecture and features production-ready tooling across the stack ([Server](https://www.apollographql.com/docs/apollo-server/getting-started.html), [Client](https://www.apollographql.com/docs/react/), and [Engine](https://www.apollographql.com/docs/engine/)).</p>
<p> A technique for improving GraphQL network performance by reducing request size over the wire. </p>
14
+
<p> A technique for improving GraphQL network performance with zero build-time configuration by reducing request size over the wire. A smaller signature reduces bandwidth utilization and speeds up client loading times. Apollo Server allows implementation of [Automatic Persisted Queries (APQ)](https://www.apollographql.com/docs/guides/performance.html#automatic-persisted-queries). </p>
15
15
16
16
<h2id="argument">Argument</h2>
17
-
<p>A parameter or set of key-value pair passed to fields in a schema to filter out results sent back from the server to the client.</p>
17
+
<p>A set of key-value pairs attached to a specific field. Arguments can be literal values or variables.</p>
18
+
19
+
```js
20
+
{
21
+
human(id:"200") {
22
+
weight(unit:"pounds")
23
+
height
24
+
}
25
+
}
26
+
```
18
27
19
28
<h2id="alias">Alias</h2>
20
29
<p>An alternative name given to the result of a field to avoid conflicts during data fetching.</p>
21
30
22
-
<h2id="data-source">Data Source</h2>
23
-
<p>A new utility and pattern for fetching and caching data from REST API endpoints. When layering GraphQL over REST APIs, data sources provides the ability to have a resource cache that saves and shares data easily across multiple GraphQL servers.</p>
<p>A class that encapsulates fetching data from a particular service, with built-in support for caching, deduplication, and error handling.</p>
48
+
49
+
<h2id="deferred-query">Deferred query</h2>
50
+
<p>A declaration prefixed with an @ character that encapsulates programming logic for query execution on the client or server. There are built-in such as @skip, @include and custom directives. It can be used for features such as authentication, incremental data loading, etc.</p>
51
+
52
+
<h2id="directive">Directive</h2>
49
53
<p>A declaration prefixed with an @ character that encapsulates programming logic for query execution on the client or server. There are built-in such as @skip, @include and custom directives. It can be used for features such as authentication, incremental data loading, etc.</p>
50
54
51
55
<h2id="docstring">Docstring</h2>
52
-
<p>A technique for providing metadata to a GraphQL Document. It can used for describing types, fields and arguments.</p>
56
+
<p>It is used for providing descriptions of types, fields and arguments. It adds metadata to a GraphQL document. Docstrings show up in the documentation panel inside GraphQL playground and GraphiQL.</p>
53
57
54
58
```js
55
59
"""
@@ -73,19 +77,33 @@ type User {
73
77
<h2id="document">Document</h2>
74
78
<p>A file or request string that contains one or multiple definitions of a GraphQL type system and can be interpreted by a GraphQL execution engine.</p>
75
79
76
-
<h2id="extensions">Extensions</h2>
77
-
<p></p>
80
+
<h2id="extensions">Extensions</h2>
81
+
<p>Special fields in the Graphql response that allows you to attach extra metadata. [Apollo tracing](https://github.com/apollographql/apollo-server/tree/master/packages/apollo-tracing) is an example of an extension. </p>
78
82
79
83
80
84
<h2id="field">Field</h2>
81
-
<p>A node in a GraphQL Object type that makes up a Schema. It is a unit of data.</p>
85
+
<p>A unit of data you are asking for in a Schema, which ends up as a field in your JSON response data.</p>
82
86
83
87
84
88
<h2id="fragment">Fragment</h2>
85
-
<p>A selection set that can be reused in multiple query operations.</p>
89
+
<p>A selection set that can be reused in multiple query operations. A [GraphQL fragment](https://www.apollographql.com/docs/react/advanced/fragments.html) is a shared piece of query logic.</p>
90
+
91
+
```js
92
+
fragment UserData on User {
93
+
id:ID!
94
+
firstName:String!
95
+
lastName:String!
96
+
}
97
+
98
+
query getUsers {
99
+
allUsers {
100
+
...UserData
101
+
}
102
+
}
103
+
```
86
104
87
105
<h2id="gql-function">gql function</h2>
88
-
<p>A JavaScript template literal tag that parses GraphQL queries.</p>
106
+
<p>A [JavaScript template literal tag](https://github.com/apollographql/graphql-tag) that parses GraphQL queries into an abstract syntax tree (AST).</p>
<p>An in-browser IDE for GraphQL development and workflow. Added benefits exist such as theme change, automatic schema reloading, HTTP headers configuration, query history and GraphQL subscription support.</p>
119
+
<p>An in-browser IDE for GraphQL development and workflow. Added benefits exist such as theme change, automatic schema reloading, HTTP headers configuration, query history and GraphQL subscription support. In addition, it comes [out-of-the-box in Apollo Server 2](https://www.apollographql.com/docs/apollo-server/features/graphql-playground.html).</p>
102
120
103
121
<h2id="graphiql">GraphiQL</h2>
104
-
<p>An in-browser IDE for GraphQL development. The first-ever GraphQL IDE released by Facebook.</p>
122
+
<p>An in-browser IDE for GraphQL development.</p>
105
123
106
124
<h2id="introspection">Introspection</h2>
107
125
<p>A technique to provide detailed information about a GraphQL API's schema. Types and fields used in introspection are prefixed with "__" two underscores.</p>
108
126
109
127
<h2id="mutation">Mutation</h2>
110
-
<p>An operation for creating, modifying and destroying data. A fetch operation happens immediately after the write.</p>
128
+
<p>An operation for creating, modifying and destroying data.</p>
129
+
130
+
```js
131
+
mutation AddTodo($type:String!) {
132
+
addTodo(type:$type) {
133
+
id
134
+
type
135
+
}
136
+
}
137
+
```
111
138
112
139
<h2id="normalization">Normalization</h2>
113
140
<p>A technique for transforming default GraphQL responses into a specific desired format.</p>
@@ -150,11 +177,29 @@ type User {
150
177
<h2id="operation-name">Operation name</h2>
151
178
<p>A name for a single query, mutation, or subscription. Identifying a query or mutation by name is very useful for logging and debugging when something goes wrong in a GraphQL server.</p>
152
179
180
+
```js
181
+
mutation AddTodo($type:String!) {
182
+
addTodo(type:$type) {
183
+
id
184
+
type
185
+
}
186
+
}
187
+
188
+
query getHuman {
189
+
human(id:"200") {
190
+
weight(unit:"pounds")
191
+
height
192
+
}
193
+
}
194
+
```
195
+
196
+
`AddTodo` and `getHuman` are names for the mutation and query operation respectively.
<p>A technique for caching inputs to GraphQL queries. This type of caching ensures that if the query is slightly different but with the same inputs, those inputs can simply be retrieved from the cache instead of fetching data again from the backend. It is implemented in Apollo Server 2 as Data Source caching.</p>
155
200
156
201
<h2id="query">Query</h2>
157
-
<p>An operation that makes a GET request to a GraphQL service requesting for some data. It's better known as a read-only fetch operation.</p>
202
+
<p>A read-only fetch operation to request data from a GraphQL service.</p>
158
203
159
204
<h2id="query-colocation">Query colocation</h2>
160
205
<p>A practice of placing a GraphQL query in the same location as the app component's view logic.</p>
<p>A technique for preventing unwanted attacks by maintaining a list of approved queries that are allowed in your application. Any query not present in the list that is run against the server will not be allowed. [Automatic Persisted Queries](../guides/performance.html#automatic-persisted-queries) is a tool by Apollo that enables query whitelisting and persisted queries.</p>
230
+
<p>A technique for preventing unwanted attacks by maintaining a list of approved queries that are allowed in your application. Any query not present in the list that is run against the server will not be allowed. [Automatic Persisted Queries](../guides/performance.html#automatic-persisted-queries) is a feature of Apollo Server 2 that enables query whitelisting and persisted queries.</p>
186
231
187
232
<h2id="resolver">Resolver</h2>
188
233
<p>A function that connects schema fields and types to various backends. It can retrieve or write data from either an SQL, a No-SQL, graph database, a micro-service or a REST API.</p>
<p>A central database that enables schema registration, tracking of detailed schema changes e.g. types added, fields added, fields deprecated and checking out previous versions of schema.</p>
249
+
<p>A central database that enables schema registration, tracking of detailed schema changes e.g. types added, fields added, fields deprecated and looking up previous versions of schema.</p>
0 commit comments