-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Failing builds in Typescript project using aws-amplify/api since this line was added #2365
Comments
- Add type guard for DocumentNode - Refactor `getGraphqlOperationType` Fixes aws-amplify#2365 Fixes aws-amplify#2362
I got another error related to AmplifyUI after adding graphql types. |
I'm facing the same problem. Is there a fixing coming @manueliglesias ? Including
|
Same problem here |
Still no resolution to this? |
Same problem |
Reporting the same issues. A short-term workaround I found is only installing the modules of Amplify that are needed and not the entire library. EX: Most likely will not solve your issues if you're using the module that requires the graphql types. |
I'm facing the same issue. Any updates to fix this? |
Me too :( |
Upgrading to Note, I tried all the workarounds in this thread. In my case nothing worked. |
Another work around for this issue is to just declare your .d.ts file and place the following inside of the file. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically closed because of inactivity. Please open a new issue if are still encountering problems. |
I got around this by using patch package and patching @types/react-native with
|
Just in case anyone is wondering, the best place to declare this file is to create a |
Still having this problem with |
@types/graphql is deprecated, because:
Try adding graphql as a dev dependency:
For me, this added |
i added |
installing graphql solved the problem for me. |
@nikhilavula i tried it. it worked. but in the browser console show this error:
I'm using amplify. i just added |
hi @Ruu-i try: declare module 'graphql/language/ast' { export type DocumentNode = any }
declare module 'graphql/error/GraphQLError' { export type GraphQLError = any } |
@CGarces I tried your solution but it led to:
Here is my original error:
|
Install npm install graphql --save-dev |
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs. Looking for a help forum? We recommend joining the Amplify Community Discord server |
Describe the bug
Since the addition of the linked line, our builds have been failing with:
We are using [email protected] and @aws-amplify/[email protected]. Our tsconfig.json is:
I can work-around the issue with the following steps
At the moment, we aren't using graphql, so the graphql dependency is a little unfortunate.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
When not using graphql, I shouldn't have to use graphql types.
Screenshots
N/A
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: