I enriched the basic federation demo bundled with gqlgen to the latest version. The latest version introduces an additional inventory service to demo provides, external and requires directives.
Upon starting the servers, I get those errors:
This data graph is missing a valid configuration. [inventory] Product.weight -> marked @external but weight is not defined on the base service of Product (products)
[inventory] Product.price -> Type `Int` does not match the type of the original field in products (`Int!`)
What did you expect?
Well, it should not bark about configuration issues and schema misalignment: I double-checked all the schemas,
[product]
extend type Query {
topProducts(first: Int = 5): [Product]
}
type Product @key(fields: "upc") {
upc: String!
name: String
price: Int
weight: Int
}
[inventory]
type Product @extends @key(fields: "upc") {
upc: String! @external
weight: Int @external
price: Int @external
inStock: Boolean
shippingEstimate: Int @requires(fields: "price weight")
}
As you can see, the price definition matches.
Also looking at the generated code, weight is implemented.
Minimal graphql.schema and models to reproduce
git clone git@github.com:orefalo/federation-demo-golang.git
cd federation-demo-golang
make build
start.sh
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
What happened?
I enriched the basic federation demo bundled with gqlgen to the latest version. The latest version introduces an additional inventory service to demo provides, external and requires directives.
Upon starting the servers, I get those errors:
What did you expect?
Well, it should not bark about configuration issues and schema misalignment: I double-checked all the schemas,
[product]
[inventory]
As you can see, the price definition matches. Also looking at the generated code, weight is implemented.
Minimal graphql.schema and models to reproduce
versions
gqlgen version
? v0.11.3go version
? go version go1.14.5 darwin/amd64