All files / domains/schema index.ts

84% Statements 21/25
25% Branches 1/4
66.67% Functions 2/3
86.96% Lines 20/23

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 2619x 19x 19x 19x 19x 19x 19x   19x 19x 19x 19x 19x 19x 19x 19x   16x 16x 16x     19x      
export {
  schemaRootsRegistry,
  mutationFieldsRegistry,
  queryFieldsRegistry,
} from './registry';
import { schemaRootsRegistry, SchemaRootConfig } from './registry';
import { showDeprecationWarning } from '~/services/utils';
// import { compileSchema } from './compiler';
export { compileSchema } from './compiler';
export { Query, Mutation } from './rootFields';
export { isSchemaRoot, getSchemaRootInstance } from './services'
 
export function SchemaRoot(config: SchemaRootConfig = {}): ClassDecorator {
  return target => {
    schemaRootsRegistry.set(target, config);
  };
}
E
export function Schema(config: SchemaRootConfig = {}) {
  showDeprecationWarning(
    'Use @SchemaRoot instead and compile like: compileSchema({ roots: [RootA, RootB] })',
    Schema,
  );
  return SchemaRoot(config);
}