mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 14:49:53 +00:00
dd79b934bf
* Add graphQL to smoke tests (INS-1592). * Remove waitForNavigation * Tidy up code, improve assertions and selectors * Fix typo * add gandalf Co-authored-by: gatzjames <jamesgatzos@gmail.com>
34 lines
586 B
TypeScript
34 lines
586 B
TypeScript
import { buildSchema } from 'graphql';
|
|
|
|
// Construct a schema, using GraphQL schema language
|
|
export const schema = buildSchema(`
|
|
"""Characters who at any time bore a Ring of Power."""
|
|
enum RingBearer {
|
|
Frodo
|
|
Bilbo
|
|
Thror
|
|
Gandalf
|
|
Galadriel
|
|
WitchKing
|
|
Nazgul
|
|
Elrond
|
|
GilGalad
|
|
Cirdan
|
|
Thrain
|
|
}
|
|
type Query {
|
|
hello: String,
|
|
bearer: RingBearer!
|
|
}
|
|
`);
|
|
|
|
// The root provides a resolver function for each API endpoint
|
|
export const root = {
|
|
hello: () => {
|
|
return 'Hello world!';
|
|
},
|
|
bearer: () => {
|
|
return 'Gandalf';
|
|
},
|
|
};
|