What is a purpose of the nodeField? #125
-
Hello, I was a bit surprised to see "Node" in the schema. After some research I found this code Lines 281 to 294 in 98c7fbe I see that the Line 136 in 98c7fbe My question is - what is it? Why do we have by default and is there a way to remove? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hey @SVilgelm! The You can read more about the |
Beta Was this translation helpful? Give feedback.
Hey @SVilgelm!
The
node
field and corresponding interface is used by the gateway to correlate entities in various backing services. Because of that, it can't really be removed from the gateway without replacing it with some other method of uniquely identifying an entity of a given type.You can read more about the
Node
interface and the gateway's approach to schema federation here: https://itnext.io/a-guide-to-graphql-schema-federation-part-1-995b639ac035