Skip to content

Commit 55544c9

Browse files
committed
added a scaler non-null field to non-non/union test
1 parent 25ed21b commit 55544c9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/analysis/buildTypeWeights.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -739,11 +739,13 @@ describe('Test buildTypeWeightsFromSchema function', () => {
739739
schema = buildSchema(`
740740
union SearchResult = Human | Droid
741741
type Human{
742+
age: Int!
742743
name: String
743744
homePlanet: String
744745
search(first: Int!): [SearchResult!]!
745746
}
746747
type Droid {
748+
age: Int!
747749
name: String
748750
primaryFunction: String!
749751
search(first: Int!): [SearchResult!]!
@@ -753,6 +755,7 @@ describe('Test buildTypeWeightsFromSchema function', () => {
753755
weight: 1,
754756
fields: {
755757
name: { weight: 0 },
758+
age: { weight: 0 },
756759
search: {
757760
resolveTo: 'searchresult',
758761
weight: expect.any(Function),
@@ -763,6 +766,7 @@ describe('Test buildTypeWeightsFromSchema function', () => {
763766
weight: 1,
764767
fields: {
765768
name: { weight: 0 },
769+
age: { weight: 0 },
766770
homePlanet: { weight: 0 },
767771
search: {
768772
resolveTo: 'searchresult',
@@ -774,6 +778,7 @@ describe('Test buildTypeWeightsFromSchema function', () => {
774778
weight: 1,
775779
fields: {
776780
name: { weight: 0 },
781+
age: { weight: 0 },
777782
primaryFunction: { weight: 0 },
778783
search: {
779784
resolveTo: 'searchresult',

0 commit comments

Comments
 (0)