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
Hi team, I'm trying to introspect a gql-gateway generated server from an ApolloServer but I am getting a 400 bad request when trying to spin up the ApolloServer with subgraphs. Wondering if theres a config or something that I'm missing?
Thanks!
gql-gateway server
importgatewayfrom'gql-gateway';constport=3001constendpointsList=[{name: 'PetStore',url: "https://petstore.swagger.io/v2/swagger.json"}];constapolloServerConfig={playground: {endpoint: 'gql-gateway'},introspection: true// Should be true by default}constlocalSchema=` extend type Order { pet: Pet }`constresolvers={Order: {pet: {fragment: '... on Order {petId}',asyncresolve(order,args,context,info){constschema=awaitcontext.resolveSchema('pet_service')returninfo.mergeInfo.delegateToSchema({
schema,operation: 'query',fieldName: 'getPetById',args: {petId: order.petId},
context,
info
})}}}}gateway({ localSchema, resolvers, endpointsList, apolloServerConfig }).then((server)=>{server.listen(port).then(({ url })=>{console.log(`Server ready at ${url}`);})})
I tried enabling introspection in as part of the apolloServerConfig but I'm still getting a bad request. I updated the issue with an updated gql file. Any idea what might be missing?
After some digging we realize that is a feature attached to Apollo Federation subgraph specification, a feature for which the package was not initially developed for.
At the same time we also realize this a nice to have.
For the moment what can we suggest, use the schema specification and add this to the localSchema property on the gql-gateway server .
Meanwhile, we will take a look at how to approach this in order to make it automatically included when there is the need to create a subgraph
Hi team, I'm trying to introspect a gql-gateway generated server from an ApolloServer but I am getting a 400 bad request when trying to spin up the ApolloServer with subgraphs. Wondering if theres a config or something that I'm missing?
Thanks!
gql-gateway server
ApolloServer
The text was updated successfully, but these errors were encountered: