You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the GitHub GraphQL API + Apollo to query Issues and Pull Requests. Requesting both requires a different object, so I have two queries, which means Apollo creates two different queries: IssueQuery and PullRequestQuery.
I need to take these models and generate the same view models from them, and so far find it a little tedious to basically write the same code twice (sharing as many functions as possible) since both queries share the exact same types but are namespaced to the root query.
I'm a GraphQL noob and just picking things up for the first time, also super impressed w/ this project and hoping to learn enough that I can contribute back to it.
The text was updated successfully, but these errors were encountered:
I'm using the GitHub GraphQL API + Apollo to query Issues and Pull Requests. Requesting both requires a different object, so I have two queries, which means Apollo creates two different queries: IssueQuery and PullRequestQuery.
I need to take these models and generate the same view models from them, and so far find it a little tedious to basically write the same code twice (sharing as many functions as possible) since both queries share the exact same types but are namespaced to the root query.
For example:
IssueQuery.Data.Repository.Issue.Label
vs
PullRequestQuery.Data.Repository.PullRequest.Label.
I can't use fragments since the IssueTimelineItem and PullRequestTimelineItem don't have any unions (right?).
Here is my issue query and pull request query.
I'm a GraphQL noob and just picking things up for the first time, also super impressed w/ this project and hoping to learn enough that I can contribute back to it.
The text was updated successfully, but these errors were encountered: