Skip to content
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

vue-apollo-components are registered twice #1336

Closed
KammererTob opened this issue Mar 23, 2022 · 3 comments
Closed

vue-apollo-components are registered twice #1336

KammererTob opened this issue Mar 23, 2022 · 3 comments

Comments

@KammererTob
Copy link

While migrating my project to Vue 3 i noticed (and got a warning) that the vue-apollo-components seem to be registered twice. Is there a specific reason for this?

Here is the code:

export function install (app, options) {
  app.component('ApolloQuery', CApolloQuery)
  app.component('ApolloQuery', CApolloQuery)
  app.component('ApolloSubscribeToMore', CApolloSubscribeToMore)
  app.component('ApolloSubscribeToMore', CApolloSubscribeToMore)
  app.component('ApolloMutation', CApolloMutation)
  app.component('ApolloMutation', CApolloMutation)
}

And those are the warnings i get:

[Vue warn]: Component "ApolloQuery" has already been registered in target app.
[Vue warn]: Component "ApolloSubscribeToMore" has already been registered in target app.
[Vue warn]: Component "ApolloMutation" has already been registered in target app.

The only thing i am doing in my app is this:
app.use(VueApolloComponents);

Expected behavior
The components to be registered only once

Versions
vue: =3.2.20
@apollo/client: ^3.5.10
@vue/apollo-components: ^4.0.0-alpha.16

@Akryum Akryum closed this as completed in 3ad3ab3 May 12, 2022
@websitevirtuoso
Copy link
Contributor

Have the same issue

@websitevirtuoso
Copy link
Contributor

Version
"@vue/apollo-components": "^4.0.0-alpha.17"
path to the file
node_modules/@vue/apollo-components/dist/vue-apollo-components.esm.js

image

@websitevirtuoso
Copy link
Contributor

@Akryum

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

No branches or pull requests

2 participants