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

Just updated from Apollo 1.8.3 to 2.16.0, codgen:generate no longer works. #1528

Closed
jonah-neugass-ck opened this issue Sep 13, 2019 · 6 comments
Labels
🐦 component - swift 🤖 component - codegen related to the codegen core packages

Comments

@jonah-neugass-ck
Copy link

So I just upgraded the Apollo tooling from 1.83 to 2.16.0 and my codegen:generate command is no longer working.

This is the command that had been working:

apollo codegen:generate --target=swift --queries="./graphql/**" --schema="./graphql/schema.json" ./graphql-ios/API.swift

Intended outcome:

The intended outcome is that the codgen command works and generates an API.swift file.

Actual outcome:

Here is the error that I get:

$ apollo codegen:generate --target=swift --queries="./graphql/**" --schema="./graphql/schema.json" ./graphql-ios/API.swift
 ›   Error: Unexpected argument: ./graphql-ios/API.swift
 ›   See more help with --help

How to reproduce the issue:

Run the command above.

Versions

Apollo 2.16.0

@designatednerd designatednerd added 🐦 component - swift 🤖 component - codegen related to the codegen core packages labels Sep 13, 2019
@designatednerd
Copy link
Contributor

designatednerd commented Sep 13, 2019

Hey @jonah-neugass-ck - can you please take a look at our updated scripts in the iOS installation instructions - some of the names of the parameters changed. I think the one throwing you off at the moment is --schema should be --localSchemaFile and the name has to be quoted

EDIT: Also, for one directory up you need to do ../blah not ./blah

@jonah-neugass-ck
Copy link
Author

Awesome, thanks for the help.

@designatednerd
Copy link
Contributor

Sure. Please feel free to close this out if those updated instructions work.

@jonah-neugass-ck
Copy link
Author

I will, one other question, do you have documentation on how to generate persisted queries with hashed query ids?

@designatednerd
Copy link
Contributor

Not directly but take a look at the description on operationIdsPath, then on the client there should be an option on instantiation to use operation IDs. Right now there's still an open PR for full support on that though.

@jonah-neugass-ck
Copy link
Author

Great, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐦 component - swift 🤖 component - codegen related to the codegen core packages
Projects
None yet
Development

No branches or pull requests

2 participants