Skip to content
This repository was archived by the owner on Sep 3, 2021. It is now read-only.

Interface handling: generate queries for interface types + FRAGMENT_TYPE fix #336

Merged
merged 13 commits into from
Nov 6, 2019

Conversation

flazoon
Copy link
Contributor

@flazoon flazoon commented Nov 6, 2019

This set of changes addresses the following items:

  1. Generate queries for interface types (but not mutations).
    e.g.

interface Person {
userId: ID!
name: String
}
type User implements Person {
userId: ID!
name: String
rated: [Rated]
}

type Query {
Person(
userId: ID
name: String
_id: String
first: Int
offset: Int
orderBy: [_PersonOrdering]
filter: _PersonFilter
): [Person]
User(
userId: ID
name: String
_id: String
first: Int
offset: Int
orderBy: [_UserOrdering]
filter: _UserFilter
): [User]

}

  1. Fix an issue with FRAGMENT_TYPE value picking the first available label.
    The fix follows the solution suggested here: Filter out labels with underscores. #301 (comment)

@johnymontana
Copy link
Contributor

Hey @flazoon! Thanks so much for this PR! Would you mind pulling in the latest commits from master? Looks like we had a slight conflict with another PR.

But otherwise, this looks good to go!

@flazoon
Copy link
Contributor Author

flazoon commented Nov 6, 2019

Thanks @johnymontana for the heads up, I've merged latest and fixed the conflicts.

@michaeldgraham
Copy link
Collaborator

This looks awesome @flazoon, thank you so much for your work on this! I'm sorry about the timing with PRs here - I hope the conflicts aren't too much of a hassle 🎉

@flazoon
Copy link
Contributor Author

flazoon commented Nov 6, 2019

My pleasure to contribute @michaeldgraham. Always glad to see refactoring changes.

@johnymontana
Copy link
Contributor

Perfect. Thanks @flazoon!

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants