Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Commit ebcdd14

Browse files
committed
Remove trailings spaces from types descriptions
1 parent 0e7dac1 commit ebcdd14

File tree

3 files changed

+34
-34
lines changed

3 files changed

+34
-34
lines changed

graphql/core/types.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ end
320320

321321
types.int = types.scalar({
322322
name = 'Int',
323-
description = "The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1. ",
323+
description = "The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",
324324
serialize = coerceInt,
325325
parseValue = coerceInt,
326326
parseLiteral = function(node)

graphql/core/util.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function util.bind1(func, x)
4242
end
4343

4444
function util.trim(s)
45-
return s:gsub('^%s+', ''):gsub('%s$', ''):gsub('%s%s+', ' ')
45+
return s:gsub('^%s+', ''):gsub('%s+$', ''):gsub('%s%s+', ' ')
4646
end
4747

4848
function util.coerceValue(node, schemaType, variables)

test/common/introspection.test.lua

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -595,8 +595,8 @@ local function run_queries(gql_wrapper)
595595
name: INLINE_FRAGMENT
596596
description: Location adjacent to an inline fragment.
597597
name: __DirectiveLocation
598-
description: 'A Directive can be adjacent to many parts of the GraphQL language,
599-
a __DirectiveLocation describes one such possible adjacencies. '
598+
description: A Directive can be adjacent to many parts of the GraphQL language,
599+
a __DirectiveLocation describes one such possible adjacencies.
600600
- interfaces: *0
601601
fields:
602602
- isDeprecated: false
@@ -709,11 +709,11 @@ local function run_queries(gql_wrapper)
709709
name: args
710710
kind: OBJECT
711711
name: __Directive
712-
description: 'A Directive provides a way to describe alternate runtime execution
712+
description: A Directive provides a way to describe alternate runtime execution
713713
and type validation behavior in a GraphQL document. In some cases, you need
714714
to provide options to alter GraphQL’s execution behavior in ways field arguments
715715
will not suffice, such as conditionally including or skipping a field. Directives
716-
provide this by describing additional information to the executor. '
716+
provide this by describing additional information to the executor.
717717
- interfaces: *0
718718
fields:
719719
- isDeprecated: false
@@ -766,8 +766,8 @@ local function run_queries(gql_wrapper)
766766
name: description
767767
kind: OBJECT
768768
name: __Field
769-
description: 'Object and Interface types are described by a list of Fields, each
770-
of which has a name, potentially a list of arguments, and a return type. '
769+
description: Object and Interface types are described by a list of Fields, each
770+
of which has a name, potentially a list of arguments, and a return type.
771771
- interfaces: *0
772772
fields:
773773
- isDeprecated: false
@@ -880,9 +880,9 @@ local function run_queries(gql_wrapper)
880880
input value.
881881
kind: OBJECT
882882
name: __InputValue
883-
description: 'Arguments provided to Fields or Directives and the input fields
883+
description: Arguments provided to Fields or Directives and the input fields
884884
of an InputObject are represented as Input Values which describe their type
885-
and optionally a default value. '
885+
and optionally a default value.
886886
- kind: INPUT_OBJECT
887887
inputFields:
888888
- type:
@@ -1135,9 +1135,9 @@ local function run_queries(gql_wrapper)
11351135
description: A list of all directives supported by this server.
11361136
kind: OBJECT
11371137
name: __Schema
1138-
description: 'A GraphQL Schema defines the capabilities of a GraphQL server. It
1138+
description: A GraphQL Schema defines the capabilities of a GraphQL server. It
11391139
exposes all available types and directives on the server, as well as the entry
1140-
points for query and mutation operations. '
1140+
points for query and mutation operations.
11411141
- kind: INPUT_OBJECT
11421142
inputFields:
11431143
- type:
@@ -1272,9 +1272,9 @@ local function run_queries(gql_wrapper)
12721272
name: description
12731273
kind: OBJECT
12741274
name: __EnumValue
1275-
description: 'One possible value for a given Enum. Enum values are unique values,
1275+
description: One possible value for a given Enum. Enum values are unique values,
12761276
not a placeholder for a string or numeric value. However an Enum value is returned
1277-
in a JSON response as a string. '
1277+
in a JSON response as a string.
12781278
- interfaces: *0
12791279
fields:
12801280
- isDeprecated: false
@@ -1365,13 +1365,13 @@ local function run_queries(gql_wrapper)
13651365
name: description
13661366
kind: OBJECT
13671367
name: __Type
1368-
description: 'The fundamental unit of any GraphQL Schema is the type. There are
1368+
description: The fundamental unit of any GraphQL Schema is the type. There are
13691369
many kinds of types in GraphQL as represented by the `__TypeKind` enum. Depending
13701370
on the kind of a type, certain fields describe information about that type.
13711371
Scalar types provide no information beyond a name and description, while Enum
13721372
types provide their values. Object and Interface types provide the fields they
13731373
describe. Abstract types, Union and Interface, provide the Object types possible
1374-
at runtime. List and NonNull types compose other types. '
1374+
at runtime. List and NonNull types compose other types.
13751375
- kind: INPUT_OBJECT
13761376
inputFields:
13771377
- type:
@@ -1402,8 +1402,8 @@ local function run_queries(gql_wrapper)
14021402
description: generated from avro-schema for order_metainfo_collection_insert
14031403
- kind: SCALAR
14041404
name: Int
1405-
description: 'The `Int` scalar type represents non-fractional signed whole numeric
1406-
values. Int can represent values between -(2^31) and 2^31 - 1. '
1405+
description: The `Int` scalar type represents non-fractional signed whole numeric
1406+
values. Int can represent values between -(2^31) and 2^31 - 1.
14071407
- kind: INPUT_OBJECT
14081408
inputFields:
14091409
- type:
@@ -2194,11 +2194,11 @@ local function run_queries(gql_wrapper)
21942194
name: args
21952195
kind: OBJECT
21962196
name: __Directive
2197-
description: 'A Directive provides a way to describe alternate runtime execution
2197+
description: A Directive provides a way to describe alternate runtime execution
21982198
and type validation behavior in a GraphQL document. In some cases, you need
21992199
to provide options to alter GraphQL’s execution behavior in ways field arguments
22002200
will not suffice, such as conditionally including or skipping a field. Directives
2201-
provide this by describing additional information to the executor. '
2201+
provide this by describing additional information to the executor.
22022202
- interfaces: *0
22032203
fields:
22042204
- isDeprecated: false
@@ -2570,9 +2570,9 @@ local function run_queries(gql_wrapper)
25702570
description: A list of all directives supported by this server.
25712571
kind: OBJECT
25722572
name: __Schema
2573-
description: 'A GraphQL Schema defines the capabilities of a GraphQL server. It
2573+
description: A GraphQL Schema defines the capabilities of a GraphQL server. It
25742574
exposes all available types and directives on the server, as well as the entry
2575-
points for query and mutation operations. '
2575+
points for query and mutation operations.
25762576
- interfaces: *0
25772577
fields:
25782578
- isDeprecated: false
@@ -2605,9 +2605,9 @@ local function run_queries(gql_wrapper)
26052605
name: description
26062606
kind: OBJECT
26072607
name: __EnumValue
2608-
description: 'One possible value for a given Enum. Enum values are unique values,
2608+
description: One possible value for a given Enum. Enum values are unique values,
26092609
not a placeholder for a string or numeric value. However an Enum value is returned
2610-
in a JSON response as a string. '
2610+
in a JSON response as a string.
26112611
- interfaces: *0
26122612
fields:
26132613
- isDeprecated: false
@@ -2698,13 +2698,13 @@ local function run_queries(gql_wrapper)
26982698
name: description
26992699
kind: OBJECT
27002700
name: __Type
2701-
description: 'The fundamental unit of any GraphQL Schema is the type. There are
2701+
description: The fundamental unit of any GraphQL Schema is the type. There are
27022702
many kinds of types in GraphQL as represented by the `__TypeKind` enum. Depending
27032703
on the kind of a type, certain fields describe information about that type.
27042704
Scalar types provide no information beyond a name and description, while Enum
27052705
types provide their values. Object and Interface types provide the fields they
27062706
describe. Abstract types, Union and Interface, provide the Object types possible
2707-
at runtime. List and NonNull types compose other types. '
2707+
at runtime. List and NonNull types compose other types.
27082708
- kind: INPUT_OBJECT
27092709
inputFields:
27102710
- type:
@@ -2759,9 +2759,9 @@ local function run_queries(gql_wrapper)
27592759
input value.
27602760
kind: OBJECT
27612761
name: __InputValue
2762-
description: 'Arguments provided to Fields or Directives and the input fields
2762+
description: Arguments provided to Fields or Directives and the input fields
27632763
of an InputObject are represented as Input Values which describe their type
2764-
and optionally a default value. '
2764+
and optionally a default value.
27652765
- interfaces: *0
27662766
fields:
27672767
- isDeprecated: false
@@ -2814,17 +2814,17 @@ local function run_queries(gql_wrapper)
28142814
name: description
28152815
kind: OBJECT
28162816
name: __Field
2817-
description: 'Object and Interface types are described by a list of Fields, each
2818-
of which has a name, potentially a list of arguments, and a return type. '
2817+
description: Object and Interface types are described by a list of Fields, each
2818+
of which has a name, potentially a list of arguments, and a return type.
28192819
- name: Double
28202820
kind: SCALAR
28212821
- kind: SCALAR
28222822
name: Boolean
28232823
description: The `Boolean` scalar type represents `true` or `false`.
28242824
- kind: SCALAR
28252825
name: Int
2826-
description: 'The `Int` scalar type represents non-fractional signed whole numeric
2827-
values. Int can represent values between -(2^31) and 2^31 - 1. '
2826+
description: The `Int` scalar type represents non-fractional signed whole numeric
2827+
values. Int can represent values between -(2^31) and 2^31 - 1.
28282828
- kind: SCALAR
28292829
name: String
28302830
description: The `String` scalar type represents textual data, represented as
@@ -3066,8 +3066,8 @@ local function run_queries(gql_wrapper)
30663066
name: INLINE_FRAGMENT
30673067
description: Location adjacent to an inline fragment.
30683068
name: __DirectiveLocation
3069-
description: 'A Directive can be adjacent to many parts of the GraphQL language,
3070-
a __DirectiveLocation describes one such possible adjacencies. '
3069+
description: A Directive can be adjacent to many parts of the GraphQL language,
3070+
a __DirectiveLocation describes one such possible adjacencies.
30713071
queryType:
30723072
name: Query
30733073
directives:

0 commit comments

Comments
 (0)