Skip to content

Commit

Permalink
Remove arg name (#168) (#169)
Browse files Browse the repository at this point in the history
[ghstack-poisoned]
  • Loading branch information
captbaritone authored Jan 16, 2025
1 parent de135e2 commit 7fe0273
Show file tree
Hide file tree
Showing 55 changed files with 3 additions and 90 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ export function getSchema(): GraphQLSchema {
type: UserType,
args: {
id: {
name: "id",
type: new GraphQLNonNull(GraphQLID)
}
},
Expand Down
26 changes: 0 additions & 26 deletions examples/production-app/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,15 @@ export function getSchema(): GraphQLSchema {
type: LikeConnectionType,
args: {
after: {
name: "after",
type: GraphQLString
},
before: {
name: "before",
type: GraphQLString
},
first: {
name: "first",
type: GraphQLInt
},
last: {
name: "last",
type: GraphQLInt
}
},
Expand Down Expand Up @@ -179,19 +175,15 @@ export function getSchema(): GraphQLSchema {
type: PostConnectionType,
args: {
after: {
name: "after",
type: GraphQLString
},
before: {
name: "before",
type: GraphQLString
},
first: {
name: "first",
type: GraphQLInt
},
last: {
name: "last",
type: GraphQLInt
}
},
Expand Down Expand Up @@ -354,19 +346,15 @@ export function getSchema(): GraphQLSchema {
type: LikeConnectionType,
args: {
after: {
name: "after",
type: GraphQLString
},
before: {
name: "before",
type: GraphQLString
},
first: {
name: "first",
type: GraphQLInt
},
last: {
name: "last",
type: GraphQLInt
}
},
Expand All @@ -380,7 +368,6 @@ export function getSchema(): GraphQLSchema {
type: NodeType,
args: {
id: {
name: "id",
type: new GraphQLNonNull(GraphQLID)
}
},
Expand All @@ -394,7 +381,6 @@ export function getSchema(): GraphQLSchema {
type: new GraphQLList(NodeType),
args: {
ids: {
name: "ids",
type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(GraphQLID)))
}
},
Expand All @@ -408,19 +394,15 @@ export function getSchema(): GraphQLSchema {
type: PostConnectionType,
args: {
after: {
name: "after",
type: GraphQLString
},
before: {
name: "before",
type: GraphQLString
},
first: {
name: "first",
type: GraphQLInt
},
last: {
name: "last",
type: GraphQLInt
}
},
Expand All @@ -434,19 +416,15 @@ export function getSchema(): GraphQLSchema {
type: UserConnectionType,
args: {
after: {
name: "after",
type: GraphQLString
},
before: {
name: "before",
type: GraphQLString
},
first: {
name: "first",
type: GraphQLInt
},
last: {
name: "last",
type: GraphQLInt
}
},
Expand Down Expand Up @@ -603,7 +581,6 @@ export function getSchema(): GraphQLSchema {
type: CreateLikePayloadType,
args: {
input: {
name: "input",
type: new GraphQLNonNull(CreateLikeInputType)
}
},
Expand All @@ -617,7 +594,6 @@ export function getSchema(): GraphQLSchema {
type: CreatePostPayloadType,
args: {
input: {
name: "input",
type: new GraphQLNonNull(CreatePostInputType)
}
},
Expand All @@ -631,7 +607,6 @@ export function getSchema(): GraphQLSchema {
type: CreateUserPayloadType,
args: {
input: {
name: "input",
type: new GraphQLNonNull(CreateUserInputType)
}
},
Expand All @@ -652,7 +627,6 @@ export function getSchema(): GraphQLSchema {
type: LikeConnectionType,
args: {
postID: {
name: "postID",
type: new GraphQLNonNull(GraphQLString)
}
},
Expand Down
1 change: 0 additions & 1 deletion examples/strict-semantic-nullability/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ export function getSchema(): GraphQLSchema {
type: GraphQLInt,
args: {
from: {
name: "from",
type: new GraphQLNonNull(GraphQLInt)
}
},
Expand Down
1 change: 0 additions & 1 deletion examples/yoga/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ export function getSchema(): GraphQLSchema {
type: new GraphQLNonNull(GraphQLInt),
args: {
from: {
name: "from",
type: new GraphQLNonNull(GraphQLInt)
}
},
Expand Down
1 change: 0 additions & 1 deletion src/codegen/schemaCodegen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,6 @@ class Codegen {
return this.ts.objectLiteral([
this.description(arg.description),
this.deprecated(arg),
F.createPropertyAssignment("name", F.createStringLiteral(arg.name)),
F.createPropertyAssignment("type", this.typeReference(arg.type)),
// TODO: arg.defaultValue seems to be missing for complex objects
arg.defaultValue !== undefined
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export function getSchema(): GraphQLSchema {
args: {
greeting: {
description: "The greeting to use.",
name: "greeting",
type: new GraphQLNonNull(GraphQLString)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ export function getSchema(): GraphQLSchema {
type: GraphQLString,
args: {
greeting: {
name: "greeting",
type: new GraphQLNonNull(MyStringType)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ export function getSchema(): GraphQLSchema {
args: {
greeting: {
deprecationReason: "Not used anymore",
name: "greeting",
type: GraphQLString
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ export function getSchema(): GraphQLSchema {
type: GraphQLString,
args: {
greeting: {
name: "greeting",
type: new GraphQLNonNull(GreetingType)
}
},
Expand Down
2 changes: 0 additions & 2 deletions src/tests/fixtures/arguments/NullableArguments.ts.expected
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ export function getSchema(): GraphQLSchema {
type: GraphQLString,
args: {
greeting: {
name: "greeting",
type: GraphQLString
}
}
Expand All @@ -47,7 +46,6 @@ export function getSchema(): GraphQLSchema {
type: GraphQLString,
args: {
greeting: {
name: "greeting",
type: GraphQLString
}
}
Expand Down
1 change: 0 additions & 1 deletion src/tests/fixtures/arguments/OptionalArgument.ts.expected
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export function getSchema(): GraphQLSchema {
type: GraphQLString,
args: {
greeting: {
name: "greeting",
type: GraphQLString
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export function getSchema(): GraphQLSchema {
type: GraphQLString,
args: {
greeting: {
name: "greeting",
type: new GraphQLNonNull(GraphQLString),
defaultValue: "Hello"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ export function getSchema(): GraphQLSchema {
args: {
greeting: {
deprecationReason: "Unused!",
name: "greeting",
type: GreetingType
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ export function getSchema(): GraphQLSchema {
args: {
greeting: {
deprecationReason: "Unused!",
name: "greeting",
type: new GraphQLNonNull(GreetingType),
defaultValue: {
name: "Alice",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ export function getSchema(): GraphQLSchema {
type: GraphQLString,
args: {
greeting: {
name: "greeting",
type: GraphQLString
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export function getSchema(): GraphQLSchema {
type: GraphQLString,
args: {
greeting: {
name: "greeting",
type: new GraphQLNonNull(GraphQLString),
defaultValue: "Hello"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ export function getSchema(): GraphQLSchema {
args: {
greeting: {
description: "How to greet the user",
name: "greeting",
type: new GraphQLNonNull(GreetingType)
}
},
Expand Down
1 change: 0 additions & 1 deletion src/tests/fixtures/arguments/StringArgument.ts.expected
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export function getSchema(): GraphQLSchema {
type: GraphQLString,
args: {
greeting: {
name: "greeting",
type: new GraphQLNonNull(GraphQLString)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export function getSchema(): GraphQLSchema {
type: GraphQLString,
args: {
inputs: {
name: "inputs",
type: new GraphQLList(new GraphQLNonNull(GraphQLString)),
defaultValue: ["hello", "there"]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ export function getSchema(): GraphQLSchema {
type: GraphQLString,
args: {
greet: {
name: "greet",
type: GraphQLBoolean,
defaultValue: false
}
Expand All @@ -47,7 +46,6 @@ export function getSchema(): GraphQLSchema {
type: GraphQLString,
args: {
greet: {
name: "greet",
type: GraphQLBoolean,
defaultValue: true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export function getSchema(): GraphQLSchema {
type: GraphQLString,
args: {
hello: {
name: "hello",
type: GraphQLString,
defaultValue: null
}
Expand All @@ -46,7 +45,6 @@ export function getSchema(): GraphQLSchema {
type: GraphQLString,
args: {
hello: {
name: "hello",
type: GraphQLString,
defaultValue: null
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export function getSchema(): GraphQLSchema {
type: GraphQLString,
args: {
scale: {
name: "scale",
type: new GraphQLNonNull(GraphQLFloat),
defaultValue: 10
}
Expand All @@ -46,7 +45,6 @@ export function getSchema(): GraphQLSchema {
type: GraphQLString,
args: {
count: {
name: "count",
type: new GraphQLNonNull(GraphQLInt),
defaultValue: 10
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ export function getSchema(): GraphQLSchema {
type: GraphQLString,
args: {
input: {
name: "input",
type: ConnectionInputType,
defaultValue: {
first: 10,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export function getSchema(): GraphQLSchema {
type: GraphQLString,
args: {
greeting: {
name: "greeting",
type: new GraphQLNonNull(GraphQLString),
defaultValue: "hello"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export function getSchema(): GraphQLSchema {
type: GraphQLString,
args: {
greeting: {
name: "greeting",
type: new GraphQLNonNull(GraphQLString),
defaultValue: "hello"
}
Expand Down
1 change: 0 additions & 1 deletion src/tests/fixtures/examples/playground.ts.expected
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ export function getSchema(): GraphQLSchema {
type: GraphQLString,
args: {
salutation: {
name: "salutation",
type: new GraphQLNonNull(GraphQLString)
}
}
Expand Down
1 change: 0 additions & 1 deletion src/tests/fixtures/examples/readme.ts.expected
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ export function getSchema(): GraphQLSchema {
type: GraphQLString,
args: {
salutation: {
name: "salutation",
type: new GraphQLNonNull(GraphQLString)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export function getSchema(): GraphQLSchema {
type: GraphQLString,
args: {
name: {
name: "name",
type: new GraphQLNonNull(GraphQLString)
}
},
Expand Down
Loading

0 comments on commit 7fe0273

Please sign in to comment.