Skip to content

Commit c83baf6

Browse files
authored
Editorial: s/server/service (#811)
We use "server" and "service" in the spec interchangeably. With a few rare exceptions we mean "service". We also use this term slightly more often, so I've replaced nearly all cases of "server" with "service" `rg server | wc -l` - 44 `rg service | wc -l` - 55 One exception is "client-server" which is a recognizable term of art
1 parent 21ec85c commit c83baf6

7 files changed

+42
-42
lines changed

spec/Section 1 -- Overview.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ Which produces the resulting data (in JSON):
2626
```
2727

2828
GraphQL is not a programming language capable of arbitrary computation, but is
29-
instead a language used to query application servers that have
29+
instead a language used to query application services that have
3030
capabilities defined in this specification. GraphQL does not mandate a
31-
particular programming language or storage system for application servers that
32-
implement it. Instead, application servers take their capabilities and map them
31+
particular programming language or storage system for application services that
32+
implement it. Instead, application services take their capabilities and map them
3333
to a uniform language, type system, and philosophy that GraphQL encodes.
3434
This provides a unified interface friendly to product development and a powerful
3535
platform for tool-building.
@@ -47,39 +47,39 @@ GraphQL has a number of design principles:
4747
their way of thinking and requirements and builds the language and runtime
4848
necessary to enable that.
4949

50-
* **Strong-typing**: Every GraphQL server defines an application-specific
50+
* **Strong-typing**: Every GraphQL service defines an application-specific
5151
type system. Queries are executed within the context of that type system.
5252
Given a query, tools can ensure that the query is both syntactically
5353
correct and valid within the GraphQL type system before execution, i.e. at
54-
development time, and the server can make certain guarantees about the shape
54+
development time, and the service can make certain guarantees about the shape
5555
and nature of the response.
5656

57-
* **Client-specified queries**: Through its type system, a GraphQL server
57+
* **Client-specified queries**: Through its type system, a GraphQL service
5858
publishes the capabilities that its clients are allowed to consume. It is
5959
the client that is responsible for specifying exactly how it will consume
6060
those published capabilities. These queries are specified at field-level
6161
granularity. In the majority of client-server applications written
62-
without GraphQL, the server determines the data returned in its various
62+
without GraphQL, the service determines the data returned in its various
6363
scripted endpoints. A GraphQL query, on the other hand, returns exactly what
6464
a client asks for and no more.
6565

66-
* **Introspective**: GraphQL is introspective. A GraphQL server's type system
66+
* **Introspective**: GraphQL is introspective. A GraphQL service's type system
6767
must be queryable by the GraphQL language itself, as will be described in this
6868
specification. GraphQL introspection serves as a powerful platform for
6969
building common tools and client software libraries.
7070

7171
Because of these principles, GraphQL is a powerful and productive environment
7272
for building client applications. Product developers and designers building
73-
applications against working GraphQL servers -- supported with quality tools --
74-
can quickly become productive without reading extensive documentation and with
73+
applications against working GraphQL services—supported with quality tools—can
74+
quickly become productive without reading extensive documentation and with
7575
little or no formal training. To enable that experience, there must be those
76-
that build those servers and tools.
76+
that build those services and tools.
7777

7878
The following formal specification serves as a reference for those builders.
7979
It describes the language and its grammar, the type system and the
8080
introspection system used to query it, and the execution and validation engines
8181
with the algorithms to power them. The goal of this specification is to provide
8282
a foundation and framework for an ecosystem of GraphQL tools, client libraries,
83-
and server implementations -- spanning both organizations and platforms -- that
83+
and service implementationsspanning both organizations and platformsthat
8484
has yet to be built. We look forward to working with the community
8585
in order to do that.

spec/Section 2 -- Language.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ Argument[Const] : Name : Value[?Const]
399399

400400
Fields are conceptually functions which return values, and occasionally accept
401401
arguments which alter their behavior. These arguments often map directly to
402-
function arguments within a GraphQL server's implementation.
402+
function arguments within a GraphQL service's implementation.
403403

404404
In this example, we want to query a specific user (requested via the `id`
405405
argument) and their profile picture of a specific `size`:

spec/Section 3 -- Type System.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Type System
22

3-
The GraphQL Type system describes the capabilities of a GraphQL server and is
3+
The GraphQL Type system describes the capabilities of a GraphQL service and is
44
used to determine if a query is valid. The type system also describes the
55
input types of query variables to determine if values provided at runtime
66
are valid.
@@ -346,7 +346,7 @@ promises to conform to ISO-8601. When querying a field of type `Time`, you can
346346
then rely on the ability to parse the result with an ISO-8601 parser and use a
347347
client-specific primitive for time. Another example of a potentially useful
348348
custom scalar is `Url`, which serializes as a string, but is guaranteed by
349-
the server to be a valid URL.
349+
the service to be a valid URL.
350350

351351
```graphql example
352352
scalar Time
@@ -373,7 +373,7 @@ all built-in scalars must be omitted for brevity.
373373

374374
**Result Coercion and Serialization**
375375

376-
A GraphQL server, when preparing a field of a given scalar type, must uphold the
376+
A GraphQL service, when preparing a field of a given scalar type, must uphold the
377377
contract the scalar type describes, either by coercing the value or producing a
378378
field error if a value cannot be coerced or if coercion may result in data loss.
379379

@@ -383,21 +383,21 @@ expected return type. For example when coercing a field of type {Int} a boolean
383383
{123}. However if internal type coercion cannot be reasonably performed without
384384
losing information, then it must raise a field error.
385385

386-
Since this coercion behavior is not observable to clients of the GraphQL server,
386+
Since this coercion behavior is not observable to clients of the GraphQL service,
387387
the precise rules of coercion are left to the implementation. The only
388-
requirement is that the server must yield values which adhere to the expected
388+
requirement is that the service must yield values which adhere to the expected
389389
Scalar type.
390390

391391
GraphQL scalars are serialized according to the serialization format being used.
392392
There may be a most appropriate serialized primitive for each given scalar type,
393-
and the server should produce each primitive where appropriate.
393+
and the service should produce each primitive where appropriate.
394394

395395
See [Serialization Format](#sec-Serialization-Format) for more detailed
396396
information on the serialization of scalars in common JSON and other formats.
397397

398398
**Input Coercion**
399399

400-
If a GraphQL server expects a scalar type as input to an argument, coercion
400+
If a GraphQL service expects a scalar type as input to an argument, coercion
401401
is observable and the rules must be well defined. If an input value does not
402402
match a coercion rule, a query error must be raised.
403403

@@ -425,7 +425,7 @@ that type to represent this scalar.
425425
Fields returning the type {Int} expect to encounter 32-bit integer
426426
internal values.
427427

428-
GraphQL servers may coerce non-integer internal values to integers when
428+
GraphQL services may coerce non-integer internal values to integers when
429429
reasonable without losing information, otherwise they must raise a field error.
430430
Examples of this may include returning `1` for the floating-point number `1.0`,
431431
or returning `123` for the string `"123"`. In scenarios where coercion may lose
@@ -460,7 +460,7 @@ should use that type to represent this scalar.
460460
Fields returning the type {Float} expect to encounter double-precision
461461
floating-point internal values.
462462

463-
GraphQL servers may coerce non-floating-point internal values to {Float} when
463+
GraphQL services may coerce non-floating-point internal values to {Float} when
464464
reasonable without losing information, otherwise they must raise a field error.
465465
Examples of this may include returning `1.0` for the integer number `1`, or
466466
`123.0` for the string `"123"`.
@@ -486,7 +486,7 @@ and that representation must be used here.
486486

487487
Fields returning the type {String} expect to encounter UTF-8 string internal values.
488488

489-
GraphQL servers may coerce non-string raw values to {String} when reasonable
489+
GraphQL services may coerce non-string raw values to {String} when reasonable
490490
without losing information, otherwise they must raise a field error. Examples of
491491
this may include returning the string `"true"` for a boolean true value, or the
492492
string `"1"` for the integer `1`.
@@ -508,7 +508,7 @@ representation of the integers `1` and `0`.
508508

509509
Fields returning the type {Boolean} expect to encounter boolean internal values.
510510

511-
GraphQL servers may coerce non-boolean raw values to {Boolean} when reasonable
511+
GraphQL services may coerce non-boolean raw values to {Boolean} when reasonable
512512
without losing information, otherwise they must raise a field error. Examples of
513513
this may include returning `true` for non-zero numbers.
514514

@@ -532,14 +532,14 @@ across many formats ID could represent, from small auto-increment numbers, to
532532
large 128-bit random numbers, to base64 encoded values, or string values of a
533533
format like [GUID](https://en.wikipedia.org/wiki/Globally_unique_identifier).
534534

535-
GraphQL servers should coerce as appropriate given the ID formats they expect.
535+
GraphQL services should coerce as appropriate given the ID formats they expect.
536536
When coercion is not possible they must raise a field error.
537537

538538
**Input Coercion**
539539

540540
When expected as an input type, any string (such as `"4"`) or integer (such as
541541
`4` or `-4`) input value should be coerced to ID as appropriate for the ID
542-
formats a given GraphQL server expects. Any other input value, including float
542+
formats a given GraphQL service expects. Any other input value, including float
543543
input values (such as `4.0`), must raise a query error indicating an incorrect
544544
type.
545545

@@ -1376,7 +1376,7 @@ enum Direction {
13761376

13771377
**Result Coercion**
13781378

1379-
GraphQL servers must return one of the defined set of possible values. If a
1379+
GraphQL services must return one of the defined set of possible values. If a
13801380
reasonable coercion is not possible they must raise a field error.
13811381

13821382
**Input Coercion**
@@ -1562,7 +1562,7 @@ like this: `pets: [Pet]`. Nesting lists is allowed: `matrix: [[Int]]`.
15621562

15631563
**Result Coercion**
15641564

1565-
GraphQL servers must return an ordered list as the result of a list type. Each
1565+
GraphQL services must return an ordered list as the result of a list type. Each
15661566
item in the list must be the result of a result coercion of the item type. If a
15671567
reasonable coercion is not possible it must raise a field error. In
15681568
particular, if a non-list is returned, the coercion should fail, as this

spec/Section 4 -- Introspection.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Introspection
22

3-
A GraphQL server supports introspection over its schema. This schema is queried
3+
A GraphQL service supports introspection over its schema. This schema is queried
44
using GraphQL itself, creating a powerful platform for tool-building.
55

66
Take an example query for a trivial app. In this case there is a User type with
77
three fields: id, name, and birthday.
88

9-
For example, given a server with the following type definition:
9+
For example, given a service with the following type definition:
1010

1111
```graphql example
1212
type User {
@@ -70,7 +70,7 @@ underscores.
7070

7171
All types in the introspection system provide a `description` field of type
7272
`String` to allow type designers to publish documentation in addition to
73-
capabilities. A GraphQL server may return the `description` field using Markdown
73+
capabilities. A GraphQL service may return the `description` field using Markdown
7474
syntax (as specified by [CommonMark](https://commonmark.org/)). Therefore it is
7575
recommended that any tool that displays `description` use a CommonMark-compliant
7676
Markdown renderer.
@@ -411,7 +411,7 @@ Fields
411411

412412
### The __Directive Type
413413

414-
The `__Directive` type represents a Directive that a server supports.
414+
The `__Directive` type represents a Directive that a service supports.
415415

416416
Fields
417417

spec/Section 5 -- Validation.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1439,8 +1439,8 @@ input object field is optional.
14391439

14401440
**Explanatory Text**
14411441

1442-
GraphQL servers define what directives they support. For each
1443-
usage of a directive, the directive must be available on that server.
1442+
GraphQL services define what directives they support. For each
1443+
usage of a directive, the directive must be available on that service.
14441444

14451445

14461446
### Directives Are In Valid Locations
@@ -1456,9 +1456,9 @@ usage of a directive, the directive must be available on that server.
14561456

14571457
**Explanatory Text**
14581458

1459-
GraphQL servers define what directives they support and where they support them.
1459+
GraphQL services define what directives they support and where they support them.
14601460
For each usage of a directive, the directive must be used in a location that the
1461-
server has declared support for.
1461+
service has declared support for.
14621462

14631463
For example the following query will not pass validation because `@skip` does
14641464
not provide `QUERY` as a valid location.

spec/Section 6 -- Execution.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ If the operation is a subscription, the result is an event stream called the
162162
"Response Stream" where each event in the event stream is the result of
163163
executing the operation for each new event on an underlying "Source Stream".
164164

165-
Executing a subscription creates a persistent function on the server that
165+
Executing a subscription creates a persistent function on the service that
166166
maps an underlying Source Stream to a returned Response Stream.
167167

168168
Subscribe(subscription, schema, variableValues, initialValue):
@@ -221,7 +221,7 @@ must receive no more events from that event stream.
221221

222222
Supporting subscriptions is a significant change for any GraphQL service. Query
223223
and mutation operations are stateless, allowing scaling via cloning of GraphQL
224-
server instances. Subscriptions, by contrast, are stateful and require
224+
service instances. Subscriptions, by contrast, are stateful and require
225225
maintaining the GraphQL document, variables, and other context over the lifetime
226226
of the subscription.
227227

@@ -354,7 +354,7 @@ of Field Execution for more about this behavior.
354354
Normally the executor can execute the entries in a grouped field set in whatever
355355
order it chooses (normally in parallel). Because the resolution of fields other
356356
than top-level mutation fields must always be side effect-free and idempotent,
357-
the execution order must not affect the result, and hence the server has the
357+
the execution order must not affect the result, and hence the service has the
358358
freedom to execute the field entries in whatever order it deems optimal.
359359

360360
For example, given the following grouped field set to be executed normally:

spec/Section 7 -- Response.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Response
22

3-
When a GraphQL server receives a request, it must return a well-formed
4-
response. The server's response describes the result of executing the requested
3+
When a GraphQL service receives a request, it must return a well-formed
4+
response. The service's response describes the result of executing the requested
55
operation if successful, and describes any errors encountered during the
66
request.
77

@@ -28,7 +28,7 @@ if set, must have a map as its value. This entry is reserved for implementors
2828
to extend the protocol however they see fit, and hence there are no additional
2929
restrictions on its contents.
3030

31-
To ensure future changes to the protocol do not break existing servers and
31+
To ensure future changes to the protocol do not break existing services and
3232
clients, the top level response map must not contain any entries other than the
3333
three described above.
3434

0 commit comments

Comments
 (0)