zapier / apollo-server-integration-testing

Test helper for writing apollo-server integration tests
MIT License
133 stars 21 forks source link

Update apollo dependencies #20

Closed thmsobrmlr closed 1 year ago

thmsobrmlr commented 3 years ago

Updates apollo dependencies for compatibility with version 3.

Note: I'm currently running into issues with this fork and type-graphql:

Cannot use GraphQLSchema "[object GraphQLSchema]" from another module or realm.

Ensure that there is only one instance of "graphql" in the node_modules
directory. If different versions of "graphql" are the dependencies of other
relied on modules, use "resolutions" to ensure only one version is installed.

https://yarnpkg.com/en/docs/selective-version-resolutions

Duplicate "graphql" modules cannot be used at the same time since different
versions may have different capabilities and behavior. The data from one
version used in the function from another could produce confusing and
spurious results.
Je12emy commented 3 years ago

Hi, I just tried this in my project, and it's working fine with type-graphql@1.1.1. Would love to use this package once this PR is merged :smile:

dchambers commented 3 years ago

I'm just now trying to upgrade a repo to Apollo Server 3 that's using apollo-server-integration-testing for integration testing, so we'd also love to see a release. Maybe it could be alpha tagged if you're unsure about the issues with type-graphql for the time being?

dchambers commented 3 years ago

I'm just now trying to upgrade a repo to Apollo Server 3 that's using apollo-server-integration-testing for integration testing, so we'd also love to see a release. Maybe it could be alpha tagged if you're unsure about the issues with type-graphql for the time being?

In case it helps anyone, I worked around this by forcing the upgrade using the resolution block in package.json, like so:

    "resolutions": {
        "apollo-server-integration-testing@npm:3.0.0/apollo-server-core": "^3.1.2",
        "apollo-server-integration-testing@npm:3.0.0/apollo-server-express": "^3.1.2"
    }
devxoul commented 2 years ago

With Yarn, I have succeeded with:

"resolutions": {
  "apollo-server-integration-testing/apollo-server-core": "^3.6.1",
  "apollo-server-integration-testing/apollo-server-express": "^3.6.1"
}
lukasbals commented 2 years ago

@devxoul https://github.com/zapier/apollo-server-integration-testing/pull/22

thmsobrmlr commented 1 year ago

Fixed by https://github.com/zapier/apollo-server-integration-testing/pull/22