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
We found out from apollo-kotlin client that the schema from graphql federation look different when created with serviceList or supergraphSdl file:
const gateway = new ApolloGateway({
serviceList: services,
// supergraphSdl: supergraphStr,
If ApolloGateway is created with serviceList, then the fields in a type are sorted in alphabetical order.
If ApolloGateway is created with supergraphSdl, then the fields in a type are listed as they were ordered in their subgraph.
Since apollo-kotlin compiles DTO classes based on the schema, the reordering causes the constructor signature incompatible when I switch between the two modes, :( while still at the same schema.
Is there some parameter in ApolloGateway to control the behavior of field ordering in a schema? Any command line tool to sort the fields in a graphql schema could help, too.
The text was updated successfully, but these errors were encountered:
I see. We had an old Java client (apollo-kotlin) built upon a schema from serviceList. We have moved to supergraphSdl and that caused a newly built of the GraphQL client to be incompatible in the Java code. I guess there will be no support of the schema format of serviceList moving forward. (That's also why the app has moved to supergraphSdl) . Just want to note there is a difference between the two schema formats, and wonder if any one else built tools when they encountered the same issue.
We found out from apollo-kotlin client that the schema from graphql federation look different when created with serviceList or supergraphSdl file:
If ApolloGateway is created with
serviceList
, then the fields in a type are sorted in alphabetical order.If ApolloGateway is created with
supergraphSdl
, then the fields in a type are listed as they were ordered in their subgraph.Since apollo-kotlin compiles DTO classes based on the schema, the reordering causes the constructor signature incompatible when I switch between the two modes, :( while still at the same schema.
Is there some parameter in ApolloGateway to control the behavior of field ordering in a schema? Any command line tool to sort the fields in a graphql schema could help, too.
The text was updated successfully, but these errors were encountered: