If I create a graphql server that has the following schema:
type Node {
id: ID!
}
type User implements Node {
id: ID!
groups: [group!]!
}
type Group implements Node {
id: ID!
name: String!
}
type Query {
me: User!
node(id: ID!): Node
}
Later using react-relay I make the following query:
query {
me {
groups {
id
name
}
}
}
which returns the following
{
me: {
groups: [{
id: '1',
name: 'food lovers'
}]
}
}
if later on in my application I make another query as follows
query {
node(id: "1") {
... on Group {
id
name
}
}
}
will react-relay make a request to the server? or is it smart enough to know that we already have all the data for the requested item in our cache?