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

fix #1237 remove unreachable types from generated code #1238

Closed
wants to merge 1 commit into from

Conversation

vikstrous
Copy link
Contributor

@vikstrous vikstrous commented Jul 3, 2020

This PR removes unreachable objects, inputs, interfaces, unions, scalars, and enums from the schema right after parsing it. It doesn't try to remove unused directives.

Existing tests did a reasonable job at covering the changes, but this does need more testing. I added unreachable.graphql with an object, an input, an interface, an union, a scalar, and an enum.

I need feedback on what to do with built in types like Int and if this warning message makes sense:

Warning: unreachable types: AIt, AbIt, Content_Child, Content_Post, Content_User, EmbeddedDefaultScalar, EmbeddedPointer, LoopA, LoopB, Map, UnreachableEnum, UnreachableInput, UnreachableInterface, UnreachableObject, UnreachableScalar, UnreachableUnion, XXIt, XxIt, asdfIt, iIt

I could use some help with the diff in the generated resolver.go code. There's some formatting issue?

I have:

  • Added tests covering the bug / feature (see testing)
  • Updated any relevant documentation (see docs)

@coveralls
Copy link

coveralls commented Jul 3, 2020

Coverage Status

Coverage increased (+0.4%) to 66.485% when pulling 91b9ff4 on vikstrous:unreachable into a3c38c6 on 99designs:master.

@stale
Copy link

stale bot commented Oct 2, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Oct 2, 2020
@frederikhors
Copy link
Collaborator

Nope

@stale stale bot removed the stale label Oct 2, 2020
@StevenACoffman
Copy link
Collaborator

@vikstrous can you resolve conflicts and see if that passes the linter this time?

@vikstrous
Copy link
Contributor Author

continued in #2139

@vikstrous vikstrous closed this May 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants