Skip to content

Commit

Permalink
[docs] remove clientMutationId and Relay Mutation spec
Browse files Browse the repository at this point in the history
  • Loading branch information
kassens committed Apr 6, 2018
1 parent 25038b6 commit 8279255
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 1,145 deletions.
15 changes: 3 additions & 12 deletions docs/GraphQL-ServerSpecification.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,11 @@ type Query {
input IntroduceShipInput {
factionId: String!
shipNamed: String!
clientMutationId: String!
}
type IntroduceShipPayload {
faction: Faction
ship: Ship
clientMutationId: String!
}
type Mutation {
Expand Down Expand Up @@ -457,13 +455,11 @@ So for our `introduceShip` mutation, we create two types: `IntroduceShipInput` a
input IntroduceShipInput {
factionId: ID!
shipName: String!
clientMutationId: String!
}
type IntroduceShipPayload {
faction: Faction
ship: Ship
clientMutationId: String!
}
```

Expand All @@ -479,7 +475,6 @@ mutation AddBWingQuery($input: IntroduceShipInput!) {
faction {
name
}
clientMutationId
}
}
```
Expand All @@ -490,8 +485,7 @@ with these params:
{
"input": {
"shipName": "B-Wing",
"factionId": "1",
"clientMutationId": "abcde"
"factionId": "1"
}
}
```
Expand All @@ -507,16 +501,13 @@ and we'll get this result:
},
"faction": {
"name": "Alliance to Restore the Republic"
},
"clientMutationId": "abcde"
}
}
}
```

Complete details on how the server should behave are available in the [GraphQL Input Object Mutations](/relay/graphql/mutations.htm) spec.

## Further Reading

This concludes the overview of the GraphQL Server Specifications. For the detailed requirements of a Relay-compliant GraphQL server, a more formal description of the [Relay cursor connection](/relay/graphql/connections.htm) model, the [Relay global object identification](/relay/graphql/objectidentification.htm) model, and the [Relay input object mutation](/relay/graphql/mutations.htm) are all available.
This concludes the overview of the GraphQL Server Specifications. For the detailed requirements of a Relay-compliant GraphQL server, a more formal description of the [Relay cursor connection](/relay/graphql/connections.htm) model and the [Relay global object identification](/relay/graphql/objectidentification.htm) model are all available.

To see code implementing the specification, the [GraphQL.js Relay library](https://github.com/graphql/graphql-relay-js) provides helper functions for creating nodes, connections, and mutations; that repository's [`__tests__`](https://github.com/graphql/graphql-relay-js/tree/master/src/__tests__) folder contains an implementation of the above example as integration tests for the repository.
1 change: 0 additions & 1 deletion docs/Modern-Mutations.md
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,6 @@ function commit(
variables: {
input: {
text,
clientMutationId: tempID++,
},
},
updater: (store) => {
Expand Down
2 changes: 1 addition & 1 deletion website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"license": "MIT",
"private": true,
"scripts": {
"update-spec": "spec-md spec/Mutations.md > static/graphql/mutations.htm && spec-md spec/Connections.md > static/graphql/connections.htm && spec-md spec/ObjectIdentification.md > static/graphql/objectidentification.htm",
"update-spec": "spec-md spec/Connections.md > static/graphql/connections.htm && spec-md spec/ObjectIdentification.md > static/graphql/objectidentification.htm",
"start": "docusaurus-start",
"build": "docusaurus-build",
"examples": "docusaurus-examples",
Expand Down
167 changes: 0 additions & 167 deletions website/spec/Mutations.md

This file was deleted.

Loading

0 comments on commit 8279255

Please sign in to comment.