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 'LaunchListQuery' in scope #3403

Closed
conradwt opened this issue Jul 3, 2024 · 2 comments
Closed

Cannot find 'LaunchListQuery' in scope #3403

conradwt opened this issue Jul 3, 2024 · 2 comments
Labels
bug Generally incorrect behavior needs investigation

Comments

@conradwt
Copy link

conradwt commented Jul 3, 2024

Summary

In step 5 of Build a project with Apollo tutorial, I'm getting an error when I add the following code to the init() method:

Implement the query

    Network.shared.apollo.fetch(query: LaunchListQuery()) { result in
        switch result {
        case .success(let graphQLResult):
            print("Success! Result: \(graphQLResult)")
        case .failure(let error):
            print("Failure! Error: \(error)")
        }
    }

Errors:

Cannot find 'LaunchListQuery' in scope
Generic parameter 'Query' could not be inferred

Version

1.13.0

Steps to reproduce the behavior

  1. Complete Tutorial Steps 1 - 5

Logs

Logging Error: Failed to initialize logging system. Log messages may be missing. If this issue persists, try setting IDEPreferLogStreaming=YES in the active scheme actions environment variables.

Anything else?

I have tried with Xcode 15.4 on macOS 14.5 without success.

@conradwt conradwt added bug Generally incorrect behavior needs investigation labels Jul 3, 2024
@calvincestari
Copy link
Member

Hi @conradwt - have you made sure to add import RocketReserverAPI to that file? The queries are generated into a separate module so you'll need to explicitly import it before you can use it.

@calvincestari calvincestari closed this as not planned Won't fix, can't repro, duplicate, stale Jul 3, 2024
Copy link
Contributor

github-actions bot commented Jul 3, 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
bug Generally incorrect behavior needs investigation
Projects
None yet
Development

No branches or pull requests

2 participants