Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
saihaj committed Jun 14, 2021
1 parent 6b31543 commit 8a4d688
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
15 changes: 2 additions & 13 deletions src/language/parser.ts
Expand Up @@ -88,7 +88,8 @@ export interface ParseOptions {
* contained in a fragment definition. They'll be represented in the
* `variableDefinitions` field of the FragmentDefinitionNode.
*
* The syntax is identical to normal, query-defined variables.
* The syntax is identical to normal, query-defined variables. For example:
*
* ```graphql
* fragment A($var: Boolean = false) on T {
* ...
Expand Down Expand Up @@ -203,9 +204,7 @@ export class Parser {
// Implements the parsing rules in the Document section.

/**
* ```
* Document : Definition+
* ```
*/
parseDocument(): DocumentNode {
return this.node<DocumentNode>(this._lexer.token, {
Expand All @@ -219,7 +218,6 @@ export class Parser {
}

/**
* ```
* Definition :
* - ExecutableDefinition
* - TypeSystemDefinition
Expand All @@ -228,7 +226,6 @@ export class Parser {
* ExecutableDefinition :
* - OperationDefinition
* - FragmentDefinition
* ```
*/
parseDefinition(): DefinitionNode {
if (this.peek(TokenKind.NAME)) {
Expand Down Expand Up @@ -263,11 +260,9 @@ export class Parser {
// Implements the parsing rules in the Operations section.

/**
* ```
* OperationDefinition :
* - SelectionSet
* - OperationType Name? VariableDefinitions? Directives? SelectionSet
* ```
*/
parseOperationDefinition(): OperationDefinitionNode {
const start = this._lexer.token;
Expand Down Expand Up @@ -297,9 +292,7 @@ export class Parser {
}

/**
* ```
* OperationType : one of query mutation subscription
* ```
*/
parseOperationType(): OperationTypeNode {
const operationToken = this.expectToken(TokenKind.NAME);
Expand All @@ -316,9 +309,7 @@ export class Parser {
}

/**
* ```
* VariableDefinitions : ( VariableDefinition+ )
* ```
*/
parseVariableDefinitions(): Array<VariableDefinitionNode> {
return this.optionalMany(
Expand All @@ -329,9 +320,7 @@ export class Parser {
}

/**
* ```
* VariableDefinition : Variable : Type DefaultValue? Directives[Const]?
* ```
*/
parseVariableDefinition(): VariableDefinitionNode {
return this.node<VariableDefinitionNode>(this._lexer.token, {
Expand Down
2 changes: 1 addition & 1 deletion src/type/definition.ts
Expand Up @@ -1093,7 +1093,7 @@ export interface GraphQLInterfaceTypeExtensions {
* all types, as well as a function to determine which type is actually used
* when the field is resolved.
*
* example
* Example
* ```ts
* const EntityType = new GraphQLInterfaceType({
* name: 'Entity',
Expand Down

0 comments on commit 8a4d688

Please sign in to comment.