Replies: 4 comments 3 replies
-
The I suggest you use the following instead: type Product @key(fields: "upc sku") {
upc: String!
sku: String!
price: String
} |
Beta Was this translation helpful? Give feedback.
-
Hi there, Wanted to check in on this despite it having been closed last year. The GQL spec does support For example, in a NodeJS federated implementation, the following SDL is valid, but this does not work currently in this library: type Product @key(fields: "sku") @key(fields: "id") {
id: ID!
sku: String!
price: String
} Any chance you'd be willing to reconsider to support this functionality? |
Beta Was this translation helpful? Give feedback.
-
I'm open to giving this another look. Repo showing an example of this being done with |
Beta Was this translation helpful? Give feedback.
-
Hello everyone, |
Beta Was this translation helpful? Give feedback.
-
The Apollo Federation docs (and apollo-server), have a feature to define multiple primary keys. This allows different services resolve the entity by different fields. Here is the example from the Apollo docs:
Running this in ariadne (I am running
0.12.0
), gives me the error: (the code to replicate is below)In my case, I am happy to steer clear of this feature, however, our other microservices (running on Node) take advantage of this and there may come a time we want to take advantage of these types.
Code to replicate:
Beta Was this translation helpful? Give feedback.
All reactions