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

Cannot find ‘***Query’ in scope #2859

Closed
CcMarioAsk opened this issue Mar 1, 2023 · 1 comment
Closed

Cannot find ‘***Query’ in scope #2859

CcMarioAsk opened this issue Mar 1, 2023 · 1 comment
Labels
bug Generally incorrect behavior needs investigation

Comments

@CcMarioAsk
Copy link

Summary

I integrated Apollo using Cocoapods.
Pod 'Apollo','~> 1.0.7'

then cd to the directory where apollo-ios-cli is located, and execute init, fetch-schema, generate and other commands respectively.

Then add the automatically generated folders and internal files to the project.

Finally, apollo is called in the project to test the connection.

But the reference to the automatically generated BankInfoQuery file reported an error, as shown in the following figure:
3EC845B9-E469-45FD-AE3A-31D5DDBEB0F8
A5A13570-9CC2-4051-B8DB-A9501D068366

when I removed the extension from the BankInfoQuery file, the error was eliminated.
96165019-4C8A-4A56-893B-C6F855B02A56
6DC5CBD8-7A2B-4E23-9A27-9B782299D387

Does this have any effect on the removal of 'extension schemeName'' from the query.graphql file? Or in what way to prevent it from being generated automatically.
D65291DD-1284-471E-8B3C-4903EE747666

In addition, if you call it in the way that ‘Fetch a query’ is recorded on https://www.apollographql.com/docs/ios/get-started, there will be an error of URLSessionClientError.sessionInvalidated.

Version

1.0.7

Steps to reproduce the behavior

When runing the code.

Logs

No response

Anything else?

No response

@CcMarioAsk CcMarioAsk added bug Generally incorrect behavior needs investigation labels Mar 1, 2023
@calvincestari
Copy link
Member

When the embeddedInTarget(name:) module type is used we wrap the schema module in a caseless enum to prevent type conflicts. In this case you probably need to use schemaApi.BankInfoQuery(), and remove the comment around public extension schemaApi {

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

No branches or pull requests

2 participants