Skip to content

Commit

Permalink
upgrade example to 0.13.0
Browse files Browse the repository at this point in the history
  • Loading branch information
zth committed Jan 16, 2021
1 parent ac98074 commit 4c8fb3d
Show file tree
Hide file tree
Showing 27 changed files with 336 additions and 332 deletions.
2 changes: 1 addition & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"react-relay": "0.0.0-experimental-c818bac3",
"reason-promise": "^1.1.1",
"reason-react": "^0.9.1",
"reason-relay": "0.12.1",
"reason-relay": "0.13.0",
"relay-compiler": "10.1.0",
"relay-config": "10.1.0",
"relay-runtime": "10.1.0",
Expand Down
2 changes: 1 addition & 1 deletion example/src/Avatar.res
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Fragment = %relay.fragment(
module Fragment = %relay(
`
fragment Avatar_user on User {
avatarUrl
Expand Down
2 changes: 1 addition & 1 deletion example/src/Main.res
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* Whew, lots of information... But the only thing you really need to think about is that
* you _pass along fragment refs by passing the full object the fragment was spread on_.
*/
module Query = %relay.query(
module Query = %relay(
`
query MainQuery {
siteStatistics {
Expand Down
2 changes: 1 addition & 1 deletion example/src/RecentTickets.res
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Fragment = %relay.fragment(
module Fragment = %relay(
`
fragment RecentTickets_query on Query
@refetchable(queryName: "RecentTicketsRefetchQuery")
Expand Down
7 changes: 6 additions & 1 deletion example/src/RelayEnv.res
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ Graphql_error(string)
* A standard fetch that sends our operation and variables to the
* GraphQL server, and then decodes and returns the response.
*/
let fetchQuery: ReasonRelay.Network.fetchFunctionPromise = (operation, variables, _cacheConfig) => {
let fetchQuery: ReasonRelay.Network.fetchFunctionPromise = (
operation,
variables,
_cacheConfig,
_uploadables,
) => {
open Fetch
fetchWithInit(
"http://localhost:4000/graphql",
Expand Down
2 changes: 1 addition & 1 deletion example/src/SingleTicket.res
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module TicketFragment = %relay.fragment(
module TicketFragment = %relay(
`
fragment SingleTicket_ticket on Ticket {
assignee {
Expand Down
2 changes: 1 addition & 1 deletion example/src/SingleTicketWorkingGroup.res
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module WorkingGroupFragment = %relay.fragment(
module WorkingGroupFragment = %relay(
`
fragment SingleTicketWorkingGroup_workingGroup on WorkingGroup
@argumentDefinitions(
Expand Down
6 changes: 3 additions & 3 deletions example/src/SingleTodo.res
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module TodoFragment = %relay.fragment(
module TodoFragment = %relay(
`
fragment SingleTodo_todoItem on TodoItem {
id
Expand All @@ -8,7 +8,7 @@ module TodoFragment = %relay.fragment(
`
)

module DeleteMutation = %relay.mutation(
module DeleteMutation = %relay(
`
mutation SingleTodoDeleteMutation(
$input: DeleteTodoItemInput!
Expand All @@ -21,7 +21,7 @@ module DeleteMutation = %relay.mutation(
`
)

module UpdateMutation = %relay.mutation(
module UpdateMutation = %relay(
`
mutation SingleTodoUpdateMutation($input: UpdateTodoItemInput!) {
updateTodoItem(input: $input) {
Expand Down
2 changes: 1 addition & 1 deletion example/src/TicketStatusBadge.res
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Fragment = %relay.fragment(
module Fragment = %relay(
`
fragment TicketStatusBadge_ticket on Ticket {
status
Expand Down
4 changes: 2 additions & 2 deletions example/src/TodoList.res
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module TodoListFragment = %relay.fragment(
module TodoListFragment = %relay(
`
fragment TodoList_query on Query
@argumentDefinitions(
Expand All @@ -19,7 +19,7 @@ module TodoListFragment = %relay.fragment(
`
)

module AddTodoMutation = %relay.mutation(
module AddTodoMutation = %relay(
`
mutation TodoListAddTodoMutation(
$input: AddTodoItemInput!
Expand Down
4 changes: 2 additions & 2 deletions example/src/TopCardsDisplayer.res
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* This is a pretty basic fragment, there are more complex ones you can have
* a look at in other components.
*/
module SiteStatisticsFragment = %relay.fragment(
module SiteStatisticsFragment = %relay(
`
fragment TopCardsDisplayer_siteStatistics on SiteStatistics {
weeklySales
Expand All @@ -15,7 +15,7 @@ module SiteStatisticsFragment = %relay.fragment(
`
)

module CurrentVisitorsSubscription = %relay.subscription(
module CurrentVisitorsSubscription = %relay(
`
subscription TopCardsDisplayer_currentVisitorsOnline_Subscription {
siteStatisticsUpdated {
Expand Down
22 changes: 12 additions & 10 deletions example/src/__generated__/Avatar_user_graphql.re

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

60 changes: 29 additions & 31 deletions example/src/__generated__/MainQuery_graphql.re

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

56 changes: 27 additions & 29 deletions example/src/__generated__/RecentTicketsRefetchQuery_graphql.re

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

Loading

0 comments on commit 4c8fb3d

Please sign in to comment.