Skip to content

Commit

Permalink
upgrade example to 0.15.0
Browse files Browse the repository at this point in the history
  • Loading branch information
zth committed Feb 23, 2021
1 parent d4f059b commit 5aea01a
Show file tree
Hide file tree
Showing 24 changed files with 1,483 additions and 1,463 deletions.
2 changes: 1 addition & 1 deletion example/bsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"ppx-flags": ["reason-relay/ppx"],
"namespace": true,
"bs-dependencies": [
"reason-react",
"@rescript/react",
"reason-relay",
"bs-fetch",
"reason-promise"
Expand Down
4 changes: 2 additions & 2 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
"react-dom": "0.0.0-experimental-4e08fb10c",
"react-relay": "0.0.0-experimental-4c4107dd",
"reason-promise": "^1.1.1",
"reason-react": "^0.9.1",
"reason-relay": "0.14.0",
"@rescript/react": "0.10.1",
"reason-relay": "0.15.0",
"relay-compiler": "10.1.3",
"relay-config": "10.1.3",
"relay-runtime": "10.1.3",
Expand Down
20 changes: 7 additions & 13 deletions example/src/SingleTodo.res
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
module TodoFragment = %relay(
`
module TodoFragment = %relay(`
fragment SingleTodo_todoItem on TodoItem {
id
text
completed
}
`
)
`)

module DeleteMutation = %relay(
`
module DeleteMutation = %relay(`
mutation SingleTodoDeleteMutation(
$input: DeleteTodoItemInput!
$connections: [ID!]!
Expand All @@ -18,11 +15,9 @@ module DeleteMutation = %relay(
deletedTodoItemId @deleteEdge(connections: $connections)
}
}
`
)
`)

module UpdateMutation = %relay(
`
module UpdateMutation = %relay(`
mutation SingleTodoUpdateMutation($input: UpdateTodoItemInput!) {
updateTodoItem(input: $input) {
updatedTodoItem {
Expand All @@ -32,8 +27,7 @@ module UpdateMutation = %relay(
}
}
}
`
)
`)

@react.component
let make = (~checked, ~todoItem as todoItemRef, ~todosConnectionId) => {
Expand Down Expand Up @@ -88,7 +82,7 @@ let make = (~checked, ~todoItem as todoItemRef, ~todosConnectionId) => {
clientMutationId: None,
id: todoItem.id,
},
connections: [todosConnectionId->ReasonRelay.dataIdToString],
connections: [todosConnectionId],
},
~optimisticResponse={
deleteTodoItem: Some({deletedTodoItemId: Some(todoItem.id)}),
Expand Down
69 changes: 0 additions & 69 deletions example/src/__generated__/Avatar_user_graphql.re

This file was deleted.

65 changes: 65 additions & 0 deletions example/src/__generated__/Avatar_user_graphql.res

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5aea01a

Please sign in to comment.