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
**What will be the equivalent gateway in AS v4 ??**
I made an attempt to do:
const gateway: GatewayInterface = {
load: async () => (await {
schema: server.systemSchema,
executor: (args) => execute({
...args,
schema: server.systemSchema,
contextValue: args.context,
variableValues: args.request.variables
})
} as GatewayLoadResult),
stop: async () => {},
onSchemaLoadOrUpdate (callback) {
callback({ apiSchema: schema } as any);
return () => {};
}
};
But i get an error thrown when i update the server. Potentially because I remove the line `server.updateSchema = callback;`. How should I perform server.updateSchema in modified gateway ???
Need aa solution.
Can you provide more details on the error? As far as I can tell, schema is undefined in the onSchemaLoadOrUpdate function, but there is a fair amount of context missing from the code so I can't be sure of much.
I can really only be more helpful if you provide a reproduction with detailed instructions on how to trigger the error. Happy to reopen this with a reproduction.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
For general questions, we recommend using StackOverflow or our discord server.
Issue Description
I have a gateway defined as follows:
Link to Reproduction
https://www.apollographql.com/docs/apollo-server/migration/#executor
Reproduction Steps
No response
The text was updated successfully, but these errors were encountered: