mirror of
https://github.com/vale981/apollo-server
synced 2025-03-13 22:36:42 -04:00
19 lines
603 B
TypeScript
19 lines
603 B
TypeScript
![]() |
import { microGraphql, microGraphiql } from './microApollo';
|
||
|
import 'mocha';
|
||
|
|
||
|
import * as micro from 'micro';
|
||
|
import testSuite, { schema as Schema, CreateAppOptions } from 'graphql-server-integration-testsuite';
|
||
|
|
||
|
function createApp(options: CreateAppOptions) {
|
||
|
if (options && options.graphiqlOptions ) {
|
||
|
return micro(microGraphiql( options.graphiqlOptions ));
|
||
|
} else {
|
||
|
const graphqlOptions = (options && options.graphqlOptions) || { schema: Schema };
|
||
|
return micro(microGraphql(graphqlOptions));
|
||
|
}
|
||
|
}
|
||
|
|
||
|
describe('integration:Micro', () => {
|
||
|
testSuite(createApp);
|
||
|
});
|