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

aws-appsync-auth-link directly imports graphql but does not declare a dependency on it #714

Open
rally25rs opened this issue Apr 5, 2022 · 0 comments
Labels
feature-request Have an idea, share it with us! p5

Comments

@rally25rs
Copy link

rally25rs commented Apr 5, 2022

Note: If your issue/feature-request/question is regarding the AWS AppSync service, please log it in the
official AWS AppSync forum

Do you want to request a feature or report a bug?
bug

What is the current behavior?
the aws-appsync-auth-link and aws-appsync-subscription-link packages directly import graphql
https://github.com/awslabs/aws-mobile-appsync-sdk-js/blob/master/packages/aws-appsync-auth-link/src/auth-link.ts#L6

However package.json does not list graphql as a dependency, so it is not allowed to be imported when using a "strict" package manager like Yarn PnP

    Cannot find module 'graphql/language/printer' from '/Users/jvalore/Projects/ui/.yarn/__virtual__/aws-appsync-auth-link-virtual-6a00cc157f/0/cache/aws-appsync-auth-link-npm-3.0.7-6a8f1c0baa-0626782710.zip/node_modules/aws-appsync-auth-link/lib'

    Require stack:
      .yarn/__virtual__/aws-appsync-auth-link-virtual-6a00cc157f/0/cache/aws-appsync-auth-link-npm-3.0.7-6a8f1c0baa-0626782710.zip/node_modules/aws-appsync-auth-link/lib/auth-link.js
      .yarn/__virtual__/aws-appsync-auth-link-virtual-6a00cc157f/0/cache/aws-appsync-auth-link-npm-3.0.7-6a8f1c0baa-0626782710.zip/node_modules/aws-appsync-auth-link/lib/index.js
      .yarn/__virtual__/aws-appsync-subscription-link-virtual-ba95336bef/0/cache/aws-appsync-subscription-link-npm-3.0.9-5e69de215e-f24ec4bcb3.zip/node_modules/aws-appsync-subscription-link/lib/realtime-subscription-handshake-link.js
      .yarn/__virtual__/aws-appsync-subscription-link-virtual-ba95336bef/0/cache/aws-appsync-subscription-link-npm-3.0.9-5e69de215e-f24ec4bcb3.zip/node_modules/aws-appsync-subscription-link/lib/index.js

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

try to use aws-appsync-auth-link in a modern Yarn PnP project and you will get the above error.

What is the expected behavior?

This package should list graphql in it's package.json dependencies since it is required.

Which versions and which environment (browser, react-native, nodejs) / OS are affected by this issue? Did this work in previous versions?

[email protected]

@iartemiev iartemiev added feature-request Have an idea, share it with us! p5 labels Feb 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Have an idea, share it with us! p5
Projects
None yet
Development

No branches or pull requests

2 participants