Skip to content

Commit

Permalink
refactor(validate): use different kinds of types in root-type-test
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasheyenbrock committed May 9, 2022
1 parent cbb05b0 commit 1697d6b
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/type/__tests__/validation-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -341,11 +341,10 @@ describe('Type System: A Schema must have Object root types', () => {
input SomeInputObject {
test: String
}
input SomeInputObject2 {
test: String
}
input SomeInputObject3 {
test: String
scalar SomeScalar
enum SomeEnum {
ENUM_VALUE_1
ENUM_VALUE_2
}
`);

Expand All @@ -362,7 +361,7 @@ describe('Type System: A Schema must have Object root types', () => {
schema,
parse(`
extend schema {
mutation: SomeInputObject2
mutation: SomeScalar
}
`),
);
Expand All @@ -371,7 +370,7 @@ describe('Type System: A Schema must have Object root types', () => {
schema,
parse(`
extend schema {
subscription: SomeInputObject3
subscription: SomeEnum
}
`),
);
Expand All @@ -384,12 +383,12 @@ describe('Type System: A Schema must have Object root types', () => {
},
{
message:
'Mutation root type must be Object type if provided, it cannot be SomeInputObject2.',
'Mutation root type must be Object type if provided, it cannot be SomeScalar.',
locations: [{ line: 3, column: 21 }],
},
{
message:
'Subscription root type must be Object type if provided, it cannot be SomeInputObject3.',
'Subscription root type must be Object type if provided, it cannot be SomeEnum.',
locations: [{ line: 3, column: 25 }],
},
]);
Expand Down

0 comments on commit 1697d6b

Please sign in to comment.