SingleFieldSubscriptions.d.ts 449 B

1234567891011121314
  1. import Maybe from '../../tsutils/Maybe';
  2. import { ASTVisitor } from '../../language/visitor';
  3. import { ASTValidationContext } from '../ValidationContext';
  4. export function singleFieldOnlyMessage(name: Maybe<string>): string;
  5. /**
  6. * Subscriptions must only include one field.
  7. *
  8. * A GraphQL subscription is valid only if it contains a single root field.
  9. */
  10. export function SingleFieldSubscriptions(
  11. context: ASTValidationContext,
  12. ): ASTVisitor;