mirror of
https://github.com/vale981/apollo-server
synced 2025-03-16 07:46:54 -04:00
35 lines
591 B
TypeScript
35 lines
591 B
TypeScript
![]() |
import {
|
||
|
assert,
|
||
|
} from 'chai';
|
||
|
|
||
|
import {
|
||
|
GraphQLSchema,
|
||
|
GraphQLObjectType,
|
||
|
GraphQLString
|
||
|
} from 'graphql';
|
||
|
|
||
|
import { runQuery } from './runQuery';
|
||
|
|
||
|
|
||
|
const QueryType = new GraphQLObjectType({
|
||
|
name: 'QueryType',
|
||
|
fields: {
|
||
|
testString: {
|
||
|
type: GraphQLString,
|
||
|
resolve(){
|
||
|
return 'it works';
|
||
|
},
|
||
|
},
|
||
|
},
|
||
|
});
|
||
|
|
||
|
const Schema = new GraphQLSchema({
|
||
|
query: QueryType,
|
||
|
});
|
||
|
|
||
|
describe('runQuery', () => {
|
||
|
it('returns a response', (done) => {
|
||
|
const query = `{ testString }`;
|
||
|
assert(true);
|
||
|
});
|
||
|
});
|