Skip to content

Commit

Permalink
Move test cases into pkg testserver
Browse files Browse the repository at this point in the history
  • Loading branch information
matiasanaya committed Nov 3, 2019
1 parent 4212cd5 commit 840d3f4
Show file tree
Hide file tree
Showing 10 changed files with 452 additions and 2,598 deletions.
Original file line number Diff line number Diff line change
@@ -1,24 +1,4 @@
package embedded

import "context"

//go:generate rm -f server-gen.go
//go:generate go run ../../../testdata/gqlgen.go

// ServerResolver model
type ServerResolver struct{}

// Query method
func (*ServerResolver) Query() QueryResolver {
return &queryResolver{}
}

type queryResolver struct{}

// Hello query
func (*queryResolver) Hello(ctx context.Context) (string, error) {
return "", nil
}
package testserver

// Case1 model
type Case1 struct {
Expand Down
17 changes: 17 additions & 0 deletions codegen/testserver/embedded.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
extend type Query {
case1: Case1
case2: Case2
# case3: Case3
}

type Case1 @goModel(model:"testserver.Case1") {
exportedEmbeddedPointerExportedMethod: String!
}

type Case2 @goModel(model:"testserver.Case2") {
unexportedEmbeddedPointerExportedMethod: String!
}

# type Case3 @goModel(model:"testserver.Case3") {
# explicitInterfaceMethod: String!
# }
9 changes: 0 additions & 9 deletions codegen/testserver/embedded/gqlgen.yml

This file was deleted.

17 changes: 0 additions & 17 deletions codegen/testserver/embedded/schema.graphql

This file was deleted.

Loading

0 comments on commit 840d3f4

Please sign in to comment.