Skip to content

Conversation

@arthurgeek
Copy link

This PR contains:

  • bugfix
  • feature
  • refactor
  • tests
  • documentation
  • metadata

Breaking Changes?

  • yes
  • no
  • not sure

If yes, please describe the breakage.

I'm unsure if this breaks under apollo-server version 2.

Please Describe Your Changes

Hi! I'm new to Apollo and wanted to use this plugin, but it fails to compile with Apollo 3.

The details on why are here: https://www.apollographql.com/docs/apollo-server/migration/#plugin-api, specially this part:

In practice, this means that all of your plugin events should use async functions or methods. If you are using TypeScript, you need to do this for your code to compile.

I don't know if you want to have this change applied or not. I haven't tested if it still works for Apollo Server 2.

Besides the main upgrade, this also upgrades apollo-boost used in the tests to apollo-client since apollo-boost is now deprecated. but, unfortunately, this made lint fail with error Missing file extension "cjs" for "@apollo/client/core" import/extensions. This import comes from here: https://www.apollographql.com/docs/react/migrating/apollo-client-3-migration/#using-apollo-client-without-react and if we use from @apollo/client, it wants to add React as a dependency. The code works and compile fine, is just that lint throws this error.

It also upgradees apollo-boost used in the tests to apollo-client.
apollo-boost is now deprecated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant