Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
sungam3r committed Dec 11, 2023
1 parent 1b18367 commit c145067
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 24 deletions.
44 changes: 22 additions & 22 deletions src/GraphQLParser/ParserContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,28 +46,28 @@ internal ref partial struct ParserContext

private static string[] DirectiveLocationOneOf { get; set; } =
[
// http://spec.graphql.org/June2018/#ExecutableDirectiveLocation
"QUERY",
"MUTATION",
"SUBSCRIPTION",
"FIELD",
"FRAGMENT_DEFINITION",
"FRAGMENT_SPREAD",
"INLINE_FRAGMENT",
"VARIABLE_DEFINITION",
// http://spec.graphql.org/June2018/#TypeSystemDirectiveLocation
"SCHEMA",
"SCALAR",
"OBJECT",
"FIELD_DEFINITION",
"ARGUMENT_DEFINITION",
"INTERFACE",
"UNION",
"ENUM",
"ENUM_VALUE",
"INPUT_OBJECT",
"INPUT_FIELD_DEFINITION",
];
// http://spec.graphql.org/June2018/#ExecutableDirectiveLocation
"QUERY",
"MUTATION",
"SUBSCRIPTION",
"FIELD",
"FRAGMENT_DEFINITION",
"FRAGMENT_SPREAD",
"INLINE_FRAGMENT",
"VARIABLE_DEFINITION",
// http://spec.graphql.org/June2018/#TypeSystemDirectiveLocation
"SCHEMA",
"SCALAR",
"OBJECT",
"FIELD_DEFINITION",
"ARGUMENT_DEFINITION",
"INTERFACE",
"UNION",
"ENUM",
"ENUM_VALUE",
"INPUT_OBJECT",
"INPUT_FIELD_DEFINITION",
];

private delegate TResult ParseCallback<out TResult>(ref ParserContext context);

Expand Down
34 changes: 32 additions & 2 deletions src/GraphQLParser/Visitors/SDLPrinter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1137,8 +1137,38 @@ private static bool TryPeekParent(TContext context, [NotNullWhen(true)] out ASTN

private static readonly string[] _hex32 =
[
"\\u0000", "\\u0001", "\\u0002", "\\u0003", "\\u0004", "\\u0005", "\\u0006", "\\u0007", "\\u0008", "\\u0009", "\\u000A", "\\u000B", "\\u000C", "\\u000D", "\\u000E", "\\u000F",
"\\u0010", "\\u0011", "\\u0012", "\\u0013", "\\u0014", "\\u0015", "\\u0016", "\\u0017", "\\u0018", "\\u0019", "\\u001A", "\\u001B", "\\u001C", "\\u001D", "\\u001E", "\\u001F"
"\\u0000",
"\\u0001",
"\\u0002",
"\\u0003",
"\\u0004",
"\\u0005",
"\\u0006",
"\\u0007",
"\\u0008",
"\\u0009",
"\\u000A",
"\\u000B",
"\\u000C",
"\\u000D",
"\\u000E",
"\\u000F",
"\\u0010",
"\\u0011",
"\\u0012",
"\\u0013",
"\\u0014",
"\\u0015",
"\\u0016",
"\\u0017",
"\\u0018",
"\\u0019",
"\\u001A",
"\\u001B",
"\\u001C",
"\\u001D",
"\\u001E",
"\\u001F"
];

// http://spec.graphql.org/October2021/#StringCharacter
Expand Down

0 comments on commit c145067

Please sign in to comment.