-
Notifications
You must be signed in to change notification settings - Fork 61
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
Codegen Vaildation - Handle Non Fatal Errors #202
Codegen Vaildation - Handle Non Fatal Errors #202
Conversation
…cops orb version git-subtree-dir: apollo-ios-codegen git-subtree-mainline: e64dae8 git-subtree-split: 44b718a9a30d97681b9d550eb1ceedc2cc5d7c30
44b718a9 chore(deps): Update CircleCI secops orb version (#197) git-subtree-dir: apollo-ios-codegen git-subtree-split: 44b718a9a30d97681b9d550eb1ceedc2cc5d7c30
70a6b37a chore(deps): Update CircleCI secops orb version (#197) git-subtree-dir: apollo-ios-pagination git-subtree-split: 70a6b37a86f420a863d345163dfaf2c4db257ff1
… secops orb version git-subtree-dir: apollo-ios-pagination git-subtree-mainline: cbc6140 git-subtree-split: 70a6b37a86f420a863d345163dfaf2c4db257ff1
…erers to use errorRecorder
d8ac9b9e chore(deps): Update to graphql-js 17.0.0-alpha.3 (#194) git-subtree-dir: apollo-ios-codegen git-subtree-split: d8ac9b9eeeefb756417ac62856cf24bcbd74b0b8
…js 17.0.0-alpha.3 git-subtree-dir: apollo-ios-codegen git-subtree-mainline: a7870b3 git-subtree-split: d8ac9b9eeeefb756417ac62856cf24bcbd74b0b8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a long one; lots of changes from merges to filter through. The gist of this looks good though. 👍🏻
...tions/CodegenXCFramework/CodegenXCFramework/MyAPI/Fragments/WarmBloodedDetails.graphql.swift
Show resolved
Hide resolved
...amework/CodegenXCFramework/MyAPI/Operations/Queries/AllAnimalsIncludeSkipQuery.graphql.swift
Show resolved
Hide resolved
apollo-ios-codegen/Sources/ApolloCodegenLib/ApolloCodegen+Errors.swift
Outdated
Show resolved
Hide resolved
apollo-ios-codegen/Sources/ApolloCodegenLib/ApolloCodegen+Errors.swift
Outdated
Show resolved
Hide resolved
apollo-ios-codegen/Sources/ApolloCodegenLib/Templates/TemplateRenderer.swift
Outdated
Show resolved
Hide resolved
} | ||
|
||
} | ||
|
||
// MARK: - Helper Extensions | ||
|
||
fileprivate extension IR.ComputedSelectionSet { | ||
extension IR.ComputedSelectionSet { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a style question but why not leave the visibility annotation on the extension vs. having to repeat it for each property and function?
…rs.swift Co-authored-by: Calvin Cestari <calvincestari@users.noreply.github.com>
…rs.swift Co-authored-by: Calvin Cestari <calvincestari@users.noreply.github.com>
…Renderer.swift Co-authored-by: Calvin Cestari <calvincestari@users.noreply.github.com>
This PR is based on top of #152. It should not be merged until after that PR is merged.
Adds
NonFatalErrors
error type andNonFatalError
struct to collect and report non fatal errors that occur during the code generation.Instead of being thrown when encountered, these errors are returned from the
TemplateRenderer
andFileGenerator
objects to allow code generation execution to continue. After codegen is finished, any errors returned here are thrown fromApolloCodegen.build()
before exiting.This also includes changes to
SelectionSetTemplate
to implement the checking for type conflict errors incrementally asComputedSelectionSet
s are built, rather than requiring allComputedSelectionSet
s to be pre-built and retained for the entirety of execution.