You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was using the model generation hook in order to a additional tag to the model structs.
which worked absolutley fine. Even starting the federated schema service no complains from go.
When starting the apollo gateway following message was thrown: Error checking for changes to service definitions: Couldn't load service definitions for "user" at http://localhost:4001: internal system error This data graph is missing a valid configuration. Couldn't load service definitions for "user" at http://localhost:4001: internal system error
Then Go told me following interface conversion: interface {} is fedruntime.Service, not model.Service
Running normal model generation
After running the normal model generation the schema worked again
and was recognized by the apollo gateway.
Manually adding the struct tag
I know it should not be done but I wanted to test it, so
I wrote the additional tag to the structs and magically it worked.
Also the gateway recognized the federated schema.
This discussion was converted from issue #1421 on January 19, 2022 14:27.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
What happened?
I was using the model generation hook in order to a additional tag to the model structs.
which worked absolutley fine. Even starting the federated schema service no complains from go.
When starting the apollo gateway following message was thrown:
Error checking for changes to service definitions: Couldn't load service definitions for "user" at http://localhost:4001: internal system error This data graph is missing a valid configuration. Couldn't load service definitions for "user" at http://localhost:4001: internal system error
Then Go told me following
interface conversion: interface {} is fedruntime.Service, not model.Service
Running normal model generation
After running the normal model generation the schema worked again
and was recognized by the apollo gateway.
Manually adding the struct tag
I know it should not be done but I wanted to test it, so
I wrote the additional tag to the structs and magically it worked.
Also the gateway recognized the federated schema.
versions
gqlgen version
?v0.13.0
go version
?go1.15.5
go modules
Beta Was this translation helpful? Give feedback.
All reactions