I am trying to build an application using GraphQL and React Relay.
As part of this I have created a root query with the following specification:
query {
AllServices {
edges {
node {
id
}
}
}
}
So I have created a mutation - which works well - called CreateGithubService.
Here is a snippet from the Relay mutation:
getFatQuery() {
return Relay.QL`
fragment on CreateGithubServicePayload {
createdService
}
`
}
getConfigs() {
return [{
type: "REQUIRED_CHILDREN",
children: [
Relay.QL`
fragment on CreateGithubServicePayload {
createdService {
id
}
}
`
]
}]
}
The problem I have is that this is not causing the views which rely on the information to update.
My AllServices query is not refetched and I am unable to specify it in the Fat Query.
How can I setup my mutation to add the element to the all services query?
Thanks!