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

generator crashes because of Apollo problems #372

Closed
dmytro-shpak opened this issue May 24, 2022 · 6 comments
Closed

generator crashes because of Apollo problems #372

dmytro-shpak opened this issue May 24, 2022 · 6 comments

Comments

@dmytro-shpak
Copy link
Contributor

Can not generate code for schema

npm -v

8.1.0

node -v

v16.13.0

 npx mst-gql "https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v3"

Error: Cannot find module
'graphql/validation/rules/KnownArgumentNamesRule'
Require stack:

Looks like the problem is related to apollographql/federation#904

@dmytro-shpak
Copy link
Contributor Author

now after switch to yarn and playing with global installation and combining of grapgql and apollo packages versions it works for me. I do not know yet what is a minimal package.json configuration

@krstns
Copy link

krstns commented May 30, 2022

The mst-gql dependencies are a mess.
The only way to use mst-gql with npm (for me) was to install it with --force. But then every time I used npm install I had to use --force which had an impact on other packages as well...
In the end, I've switched to yarn (it wasn't that bad when using NX) but this is not possible for every project :/
I guess this goes under the radar because contributors are using yarn and simply don't see the issues on the other side of the fence. I keep wondering though if what yarn does when installing mst-gql is safe...

@dmytro-shpak
Copy link
Contributor Author

dmytro-shpak commented Jun 5, 2022

ok, like a workaround for me works yarn and

        "apollo": "^2.34.0",
        "graphql": "15.8.0",
        "graphql-request": "^4.2.0",
        "mobx": "^6.6.0",
        "mobx-react-lite": "^3.4.0",
        "mobx-router": "^1.0.0",
        "mobx-state-tree": "^5.1.5",
        "mst-gql": "^0.15.0",
        "react": "^18.1.0",
        "react-dom": "^18.1.0"

@jesse-savary
Copy link
Member

Hey @dmytro-shpak, 0.16.0 will be out soon with a fix for this and other bugs. I'm working on upgrading/replacing dependencies right now.

@jesse-savary
Copy link
Member

Should be resolved as of 0.17.0.

@Benz19 Benz19 closed this as completed Nov 5, 2022
@dmytro-shpak
Copy link
Contributor Author

confirm

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

4 participants