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

error running codegen when removing a source from .meshrc.yml #1561

Open
GlCap opened this issue Jul 21, 2022 · 3 comments
Open

error running codegen when removing a source from .meshrc.yml #1561

GlCap opened this issue Jul 21, 2022 · 3 comments

Comments

@GlCap
Copy link

GlCap commented Jul 21, 2022

Provide environment information

v16.15.1

What browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

No response

Describe the Bug

when running mesh build on the latest @graphcommerce/[email protected] and @graphcommerce/[email protected] the cli throws an error on each graphqls schema:

💥 🕸️  Mesh Error: Directive "@injectable" already exists in the schema. It cannot be redefined.

Directive "@in...

ONLY when a single source is present in the .meshrc.yml config file

I realize this use case for graphql mesh is weird because it defeats its purpose, but we don't need graphcms in our project.

using the same source twice with a different name works for some reason

Expected Behavior

mesh building a single source

To Reproduce

remove graphcms source from .meshrc.yml, but it should throw the same error even if removing m2 source

@paales
Copy link
Member

paales commented Jul 22, 2022

This might be due to a version mismatch between different packages, could you do a search through the node_modules/@graphcommerce folder for @Injectable and see if you find it multiple times?

@GlCap
Copy link
Author

GlCap commented Jul 25, 2022

This might be due to a version mismatch between different packages, could you do a search through the node_modules/@graphcommerce folder for @Injectable and see if you find it multiple times?

I can confirm you that "@Injectable" is not the problem, removing the declaration within node_modules simply moves the error to another schema declaration, anyway this issue can be reproduced on a clean working example

@paales
Copy link
Member

paales commented Jul 25, 2022

@GlCap Got it reproduced

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