Skip to content

Deprecation warning: connectToDevTools should be replaced with devtools.enabled in Apollo Client v3.14+ #662

@valeriosillari

Description

@valeriosillari

Environment

Describe the bug

When using @nuxtjs/apollo ^5.0.0-alpha.14 with Apollo Client ^3.14.0, a warning appears in the server console during SSR:

ssr:warn An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#%7B%22version%22%3A%223.14.0%22%2C%22message%22%3A104%2C%22args%22%3A%5B%22ApolloClient%22%2C%22connectToDevTools%22%2C%22Please%20use%20%60devtools.enabled%60%20instead.%22%5D%7D at node_modules/ts-invariant/lib/invariant.js at Function.warn (node_modules/@apollo/client/utilities/globals/invariantWrappers.js) at node_modules/@apollo/client/utilities/deprecation/index.js

Link url provided:
https://www.apollographql.com/docs/react/errors#%7B%22version%22%3A%223.14.0%22%2C%22message%22%3A104%2C%22args%22%3A%5B%22ApolloClient%22%2C%22connectToDevTools%22%2C%22Please%20use%20%60devtools.enabled%60%20instead.%22%5D%7D

This is triggered by Apollo Client’s internal deprecation of the connectToDevTools option, which was replaced with the new devtools.enabled syntax starting in Apollo Client v3.14.

The warning does not break anything, but clutters SSR logs.

Expected behaviour

  1. Set latest options and syntax for Apollo Client
  2. No warnings on Nuxt

Reproduction

No response

Additional context

I've created a Pull Request for solving the issue, here:

#663

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions