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’m in the process of upgrading an Apollo Server project from v3 to v4. As part of the project, I need to send an introspection request to a remote schema, but I’m having trouble migrating the existing code due to deprecated functions.
Here’s a snippet of the original v3 code, which uses HttpLink and introspectSchema:
import { introspectSchema } from 'graphql-tools';
import { HttpLink } from 'apollo-link-http';
const serverLink = new HttpLink({
uri: serverUrl,
fetch
});
return await introspectSchema(serverLink);
I've tried converting this to use buildHTTPExecutor and schemaFromExecutor from @graphql-tools/wrap and @graphql-tools/executor-http, but it’s not working as expected. Here’s the updated snippet I attempted:
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
-
Hi everyone,
I’m in the process of upgrading an Apollo Server project from v3 to v4. As part of the project, I need to send an introspection request to a remote schema, but I’m having trouble migrating the existing code due to deprecated functions.
Here’s a snippet of the original v3 code, which uses HttpLink and introspectSchema:
I've tried converting this to use buildHTTPExecutor and schemaFromExecutor from @graphql-tools/wrap and @graphql-tools/executor-http, but it’s not working as expected. Here’s the updated snippet I attempted:
When the code reaches
schemaFromExecutor()
, I'm getting the following error:Here are the package versions I'm using:
@graphql-tools/executor-http: ^1.1.6
@graphql-tools/wrap: ^10.0.5
Has anyone encountered this issue while upgrading? Am I missing something crucial in the migration process? Any help would be much appreciated!
Beta Was this translation helpful? Give feedback.
All reactions