-
Notifications
You must be signed in to change notification settings - Fork 737
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
Type does not conform to protocol 'GraphQLOperation' #769
Comments
You should have some updated codegen that will run when this is built, and which will automatically generate operation names. If it does not, try cleaning your build folder and running it again. |
So after updating npm to the latest version, I got past those errors. Now I'm just getting an undefined error, the dreaded:
I have a bunch of lint warnings about nesting too deep, but none that are serious. |
It looks like I need to go through and update a bunch of GraphQL -> Result types that weren't showing up in the build error logs. Will let you know if that fixes anything. |
Yes - I would recommend reading through the changelog for breaking changes you want to be aware of - that's definitely one of them. I would also recommend clicking on that error in Xcode if it's still showing up, the Apollo CLI will probably have more to say about what went wrong in the details |
So after a bunch of cleaning and rebuilding, closing and opening xcode, and making sure all updates were made as per the changelog, I finally got the project to build with 0.15.3. Unfortunately, we're now seeing the schema being unable to be built on CircleCI. While I investigate why, it came to me that I have now updated the apollo cli to the latest version and when I switch back to another branch that is running an older Apollo pod version, there will be version inconsistency between the Apollo pod and the CLI. How do people reconcile this issue? Do I need to downgrade my Apollo version when I switch back to a branch that has a different version of the pod? Do I need to do anything on CircleCI in order to have the right version of the CLI installed in each container? |
...yeah...this is why #766 is a thing, to be honest. Generally the We're moving to including the binaries with the pod very shortly to avoid all this nonsense. |
Ok, so yeah that is a big change but a welcome one for us, I'm assuming. Since we've never updated the pod version while I've been a part of the project I'm unsure of how changes to the required CLI version may have affected compiling on CircleCI. Based on your last comment on #766, it looks like you are planning to merge that sometime today? Would that increase the version of the pod to install sometime soon or is there a lot more testing to be done post-merge? Is there a handy chart of what CLI is required for what pod version? Our project had been built on 0.10.1 prior to me upgrading to 0.15.3. |
yeah there will be a new version when that gets merged. There isn't a chart, but if you look in |
So in order to fix the build issues on CircleCI, we had to change the BuildPhase script for to
If anyone runs in to a similar issue. Looks like the Docker image that CircleCI spun up was unable to find the script by just running the |
OK cool - thank you for the heads up on that, I'll update the docs there. Anything else or can we close this issue out? |
All set for now. Thank you very much for your responsiveness and help here, @designatednerd! |
@adamirowe please see #776 for updated docs, lmk if you have feedback |
I just upgraded our version of Apollo to
0.15.3
and nearly every query we use has a compile error ofType 'xxx' does not conform to protocol 'GraphQLOperation'
If I add the Protocol stubs that xCode is suggesting (
public var operationName: String
), the errors go away. But since this is a dynamically generated file that's obviously not going to work next time I build.Am I understanding correctly that we'll need to add operationName properties to all of our queries and mutations moving forward? I couldn't find anything in the examples or release notes about this.
The text was updated successfully, but these errors were encountered: