Skip to content

Commit

Permalink
chore: add more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jensneuse committed Oct 12, 2023
1 parent fe1d8bf commit 4c64ee0
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions v2/pkg/engine/plan/schemausageinfo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,18 @@ func TestGetSchemaUsageInfo(t *testing.T) {
Item: &resolve.Object{
Nullable: true,
Fields: []*resolve.Field{
{
Name: []byte("__typename"),
Value: &resolve.String{
Path: []string{"__typename"},
Nullable: false,
},
Info: &resolve.FieldInfo{
Name: "__typename",
ParentTypeNames: []string{"Human", "Droid"},
Source: source,
},
},
{
Name: []byte("name"),
Value: &resolve.String{
Expand Down Expand Up @@ -85,6 +97,14 @@ func TestGetSchemaUsageInfo(t *testing.T) {
IDs: []string{"https://swapi.dev/api"},
},
},
{
Path: []string{"searchResults", "__typename"},
TypeNames: []string{"Human", "Droid"},
FieldName: "__typename",
Source: TypeFieldSource{
IDs: []string{"https://swapi.dev/api"},
},
},
{
Path: []string{"searchResults", "name"},
TypeNames: []string{"Human", "Droid"},
Expand Down

0 comments on commit 4c64ee0

Please sign in to comment.