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

[EXPERIMENTAL] - support inputUnion #351

Closed
wants to merge 6 commits into from
Closed

Conversation

acao
Copy link
Member

@acao acao commented Apr 5, 2019

Meant to be used with graphql/graphql-js#1196
Pending: matching PRs for graphql-config graphql-import and @types/graphql

word('inputUnion'),
name('atom'),
list('Directive'),
p('='),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think we need the optional default keyword here as well?

@acao acao changed the title add inputUnion fork, get tests running [EXPERIMENTAL] - add inputUnion fork, get tests running Apr 5, 2019
@@ -196,6 +198,7 @@ export const ParseRules: {[name: string]: ParseRule} = {
Type(token: Token) {
return token.value === '[' ? 'ListType' : 'NonNullType';
},
InputUnionValue: [p('{'), list('ObjectField'), p('}')],
Copy link
Member Author

@acao acao Apr 5, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't figure out how to get Value to return this in the case statement above, but maybe that's because I never saw a kind for it?

@acao acao changed the title [EXPERIMENTAL] - add inputUnion fork, get tests running [EXPERIMENTAL] - support inputUnion Apr 5, 2019
@acao
Copy link
Member Author

acao commented Apr 5, 2019

Screen Shot 2019-04-05 at 10 27 12 AM

This is where I'm at now, seems close

@acao
Copy link
Member Author

acao commented Apr 5, 2019

@asiandrummer @AGS- @wincent thoughts?

@acao
Copy link
Member Author

acao commented Apr 6, 2019

Ah ha! It was true that ASTDefinitionBuilder._makeSchemaDef in the graphql-js branch is missing INPUT_UNION_TYPE_DEFINITION. I'll follow up over there. It looks like I'm getting a valid InputUnionTypeDefinition from a .graphql file now (Using the GraphQLCache-test) :)!!!

@acao
Copy link
Member Author

acao commented Apr 7, 2019

This has come a long way since yesterday. Moved discussion to the graphql-js PR

@acao
Copy link
Member Author

acao commented Dec 12, 2019

save this one for posterity!

@acao acao closed this Dec 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant