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

@defer issue #3372

Closed
HandyappGroup opened this issue Apr 26, 2024 · 8 comments
Closed

@defer issue #3372

HandyappGroup opened this issue Apr 26, 2024 · 8 comments
Labels
awaiting response bug Generally incorrect behavior

Comments

@HandyappGroup
Copy link

HandyappGroup commented Apr 26, 2024

Summary

I've downloaded the latest version, which technically fixes the @defer issue, but the problem is still exists.

Version

1.10.0

Steps to reproduce the behavior

Just try to generate new files using defer version fix. This is the version i've used - https://github.com/apollographql/apollo-ios/releases/tag/preview-defer.2

Logs

No response

Anything else?

CleanShot 2024-04-26 at 23 33 10

@HandyappGroup HandyappGroup added bug Generally incorrect behavior needs investigation labels Apr 26, 2024
@calvincestari
Copy link
Member

Please update your version of the Codegen CLI by following the instructions at: ...

@HandyappGroup this error is correct, and expected. You cannot mix versions. You must install, and use, the CLI that from the dependency version your project is using. This looks like you were using preview-defer.2 and then changed to 1.10.0 but didn't re-install the CLI.

Error: JavaScriptError: GraphQLSchemaValidationError-There can be only one directive named "@defer".-GraphQLSchemaValidationError"

As for this error, I suggest fixing the first one and then we can focus on whether this is still relevant and in which version.

@xLuciferSx
Copy link

HI. I've updated Apollo and CLi version to use preview-defer.2 but still getting the same error.

CleanShot 2024-04-30 at 23 39 24
CleanShot 2024-04-30 at 23 40 23

@calvincestari
Copy link
Member

Take a look in your schema for the @defer directive definition, it will look like this:

directive @defer(label: String, if: Boolean! = true) on FRAGMENT_SPREAD | INLINE_FRAGMENT

Make sure there is only one @defer directive definition.

@xLuciferSx
Copy link

Take a look in your schema for the @defer directive definition, it will look like this:

directive @defer(label: String, if: Boolean! = true) on FRAGMENT_SPREAD | INLINE_FRAGMENT

Make sure there is only one @defer directive definition.

Removed defer but throwing now different errors. I am happy to share graphqls file over email for team to have a look.

@calvincestari
Copy link
Member

calvincestari commented May 1, 2024

I am happy to share graphqls file over email for team to have a look.

@xLuciferSx - sure, email it to me () and I'll take a look.

@xLuciferSx
Copy link

xLuciferSx commented May 1, 2024

I am happy to share graphqls file over email for team to have a look.

@xLuciferSx - sure, email it to me () and I'll take a look.

Email sent :)

@calvincestari
Copy link
Member

Closing as this seems to have been a syntax problem in an operation file. The graphql-js error messages are misleading and don't clearly point to the actual problem.

Copy link
Contributor

github-actions bot commented May 1, 2024

Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo iOS usage and allow us to serve you better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting response bug Generally incorrect behavior
Projects
None yet
Development

No branches or pull requests

3 participants