Skip to content

Commit

Permalink
Add test case for union pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathew Byrne committed Mar 18, 2019
1 parent 8257d42 commit f02dabb
Show file tree
Hide file tree
Showing 6 changed files with 259 additions and 0 deletions.
209 changes: 209 additions & 0 deletions codegen/testserver/generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions codegen/testserver/models-gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions codegen/testserver/resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ func (r *queryResolver) DefaultScalar(ctx context.Context, arg string) (string,
func (r *queryResolver) Slices(ctx context.Context) (*Slices, error) {
panic("not implemented")
}
func (r *queryResolver) OptionalUnion(ctx context.Context) (TestUnion, error) {
panic("not implemented")
}
func (r *queryResolver) ValidType(ctx context.Context) (*ValidType, error) {
panic("not implemented")
}
Expand Down
4 changes: 4 additions & 0 deletions codegen/testserver/stub.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions codegen/testserver/useptr.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
type A {
id: ID!
}

type B {
id: ID!
}

union TestUnion = A | B

extend type Query {
optionalUnion: TestUnion
}
Loading

0 comments on commit f02dabb

Please sign in to comment.