-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce Apollo v4 support & Drop Apollo v2/v3 and Node 16 support #2444
base: master
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 0b04b56 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
diff --git a/website/algolia-lockfile.json b/website/algolia-lockfile.json
index 9146307b..4dbdadec 100644
--- a/website/algolia-lockfile.json
+++ b/website/algolia-lockfile.json
@@ -224,7 +224,7 @@
"anchor": "moduleconfig"
}
],
- "content": "f3f51ccec98335a6165e261708ff5231",
+ "content": "a6aff48d899f1401a65ced944b5ce3fd",
"url": "https://www.the-guild.dev/graphql/modules/docs/api",
"domain": "https://www.the-guild.dev/graphql/modules",
"hierarchy": ["docs"],
@@ -596,7 +596,7 @@
"anchor": "tutorial"
}
],
- "content": "e6552b6d40cb7bee9aa2fb831d17d53a",
+ "content": "850e4778bbb21aeba497553b6315dca5",
"url": "https://www.the-guild.dev/graphql/modules/docs/get-started",
"domain": "https://www.the-guild.dev/graphql/modules",
"hierarchy": ["docs"], |
💻 Website PreviewThe latest changes are available as preview in: https://725ec798.graphql-modules.pages.dev |
@@ -542,101 +541,6 @@ test('Operation scoped provider should be created once per GraphQL Operation', a | |||
expect(loadSpy).toHaveBeenCalledWith(1); | |||
}); | |||
|
|||
test('Operation scoped provider should be created once per GraphQL Operation (Apollo Server)', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ardatan why it's deleted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed it because we don't have createSchemaForApollo
anymore but now I've added it back by using Apollo Server itself.
77b1b8b
to
f59bbae
Compare
typeDefs: Application['typeDefs']; | ||
createExecution: Application['createExecution']; | ||
}): Application['createApolloGateway'] { | ||
return function createApolloGateway(options) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ardatan why do we have now createApolloGateway
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apollo removed executor
so the only way of changing the executor is gateway
, and it handles the schema as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some comments. Can you explain the pull request a bit? You did a lot of changes but it's hard for me to understand what and why.
I updated the description @kamilkisiela |
Can you force push from |
@darkbasic rebased. New alpha versions will be available soon. |
@enisdenjo this is weird but somehow CI didn't get triggered: can you please manually re-run it? |
@darkbasic here it is 0b04b56. |
Oh that's even weirder because somehow the bot didn't update the comment with the new packages: #2444 (comment) |
Closes #2270
This PR also updates example with latest versions of GraphQL Yoga and Apollo Server.
It also replaces deprecated Express GraphQL with the new GraphQL HTTP reference implementation.
First of all, I removed apollo executor and apollo schema creation.
executor
is not available anymore in Apollo Server's constructor, so instead we create agateway
instance to pass the schema and our executor. This happens increateApolloGateway
. Schema creation is not needed because Apollo doesn't handle subscriptions anymore.Then I updated Apollo packages from
apollo-server
to@apollo/server
in all tests, examples etc.I also replaced Express GraphQL with GraphQL HTTP.
Then I updated GraphQL Yoga packages and its usage in the examples.