From 8507e05e63baa33db9f5d373f975cad175a9c129 Mon Sep 17 00:00:00 2001 From: Ian Hoffman Date: Wed, 22 Sep 2021 14:41:10 -0700 Subject: [PATCH 1/2] Support descriptions and deprecations in introspection --- .../Fields/ConnectionFieldBuilder.hack | 2 +- src/Codegen/Builders/Fields/FieldBuilder.hack | 42 ++++++++++++- .../IntrospectionSchemaFieldBuilder.hack | 6 -- .../Builders/Fields/MethodFieldBuilder.hack | 19 +++--- .../Builders/Fields/ShapeFieldBuilder.hack | 8 +-- src/Codegen/Builders/ObjectBuilder.hack | 4 -- src/Field.hack | 8 ++- src/FieldDefinition.hack | 12 ++-- tests/Fixtures/IntrospectionTestObjects.hack | 7 ++- tests/IntrospectionTest.hack | 35 +++++++++++ tests/gen/AlphabetConnection.hack | 8 ++- tests/gen/AnotherObjectShape.hack | 5 +- tests/gen/Bot.hack | 17 ++++- tests/gen/Concrete.hack | 11 +++- tests/gen/ErrorTestObj.hack | 38 +++++++++++- tests/gen/Human.hack | 23 ++++++- tests/gen/InterfaceA.hack | 5 +- tests/gen/InterfaceB.hack | 8 ++- tests/gen/IntrospectionTestObject.hack | 34 +++++++++- tests/gen/Mutation.hack | 8 ++- tests/gen/NestedOutputShape.hack | 5 +- tests/gen/ObjectShape.hack | 11 +++- tests/gen/OutputShape.hack | 11 +++- tests/gen/OutputTypeTestObj.hack | 26 +++++++- tests/gen/PageInfo.hack | 14 ++++- tests/gen/Query.hack | 62 ++++++++++++++++++- tests/gen/StringTypeEdge.hack | 8 ++- tests/gen/Team.hack | 14 ++++- tests/gen/User.hack | 14 ++++- tests/gen/UserConnection.hack | 8 ++- tests/gen/UserEdge.hack | 8 ++- tests/gen/__Directive.hack | 14 ++++- tests/gen/__EnumValue.hack | 14 ++++- tests/gen/__Field.hack | 20 +++++- tests/gen/__InputValue.hack | 14 ++++- tests/gen/__Schema.hack | 17 ++++- tests/gen/__Type.hack | 29 ++++++++- tests/schema.json | 11 ++++ 38 files changed, 531 insertions(+), 69 deletions(-) diff --git a/src/Codegen/Builders/Fields/ConnectionFieldBuilder.hack b/src/Codegen/Builders/Fields/ConnectionFieldBuilder.hack index c60023b..86a031a 100644 --- a/src/Codegen/Builders/Fields/ConnectionFieldBuilder.hack +++ b/src/Codegen/Builders/Fields/ConnectionFieldBuilder.hack @@ -32,7 +32,7 @@ final class ConnectionFieldBuilder extends MethodFieldBuilder { <<__Override>> protected function getArgumentDefinitions(): vec { - return Vec\concat($this->data['parameters'], $this->getConnectionParameters()); + return Vec\concat($this->data['parameters'] ?? vec[], $this->getConnectionParameters()); } /** diff --git a/src/Codegen/Builders/Fields/FieldBuilder.hack b/src/Codegen/Builders/Fields/FieldBuilder.hack index 7a3ca5e..def935d 100644 --- a/src/Codegen/Builders/Fields/FieldBuilder.hack +++ b/src/Codegen/Builders/Fields/FieldBuilder.hack @@ -11,10 +11,17 @@ use type Facebook\HackCodegen\{HackBuilder, HackBuilderValues}; */ abstract class FieldBuilder { - abstract const type TField as shape( + const type TField = shape( 'name' => string, 'output_type' => shape('type' => string, ?'needs_await' => bool), - ... + ?'description' => string, + ?'is_deprecated' => bool, + ?'deprecation_reason' => string, + ?'method_name' => string, + ?'parameters' => vec, + ?'root_field_for_type' => string, + ?'is_static' => bool, + ?'is_optional' => bool, ); public function getName(): string { @@ -33,8 +40,10 @@ abstract class FieldBuilder { \ReflectionMethod $rm, bool $is_root_field = false, ): FieldBuilder { + $deprecated = $rm->getAttribute('__Deprecated'); $data = shape( 'name' => $field->getName(), + 'description' => $field->getDescription(), 'method_name' => $rm->getName(), 'output_type' => output_type( $rm->getReturnTypeText(), @@ -54,8 +63,13 @@ abstract class FieldBuilder { return $data; }, ), + 'is_deprecated' => !!$deprecated, ); + if ($deprecated) { + $data['deprecation_reason'] = C\firstx($deprecated) as string; + } + if ($is_root_field) { $data['root_field_for_type'] = $rm->getDeclaringClass()->getName(); } @@ -126,6 +140,30 @@ abstract class FieldBuilder { $this->generateResolverBody($hb); $hb->addLine(','); + // Field description + if ($this->data['description'] ?? '') { + $description_literal = \var_export($this->data['description'] ?? '', true); + $hb->addLinef('%s,', $description_literal); + } else { + // Fields built from shape members don't have descriptions as of yet + $hb->addLine('null,'); + } + + // Deprecation info + if ($this->data['is_deprecated'] ?? false) { + $hb->addLine('true,'); + $deprecation_reason = Shapes::idx($this->data, 'deprecation_reason'); + } else { + $hb->addLine('false,'); + $deprecation_reason = null; + } + + if ($deprecation_reason is nonnull) { + $hb->addLine(\var_export($deprecation_reason, true).','); + } else { + $hb->addLine('null,'); + } + // End of new GraphQL\FieldDefinition( $hb->unindent()->addLine(');'); $hb->unindent(); diff --git a/src/Codegen/Builders/Fields/IntrospectionSchemaFieldBuilder.hack b/src/Codegen/Builders/Fields/IntrospectionSchemaFieldBuilder.hack index 9d93f49..9551db2 100644 --- a/src/Codegen/Builders/Fields/IntrospectionSchemaFieldBuilder.hack +++ b/src/Codegen/Builders/Fields/IntrospectionSchemaFieldBuilder.hack @@ -5,12 +5,6 @@ namespace Slack\GraphQL\Codegen; use type Facebook\HackCodegen\{HackBuilder}; final class IntrospectSchemaFieldBuilder extends FieldBuilder { - const type TField = shape( - 'name' => string, - 'output_type' => shape('type' => string, ?'needs_await' => bool), - ... - ); - public function __construct() { parent::__construct(shape( 'name' => '__schema', diff --git a/src/Codegen/Builders/Fields/MethodFieldBuilder.hack b/src/Codegen/Builders/Fields/MethodFieldBuilder.hack index a0289cf..17ae234 100644 --- a/src/Codegen/Builders/Fields/MethodFieldBuilder.hack +++ b/src/Codegen/Builders/Fields/MethodFieldBuilder.hack @@ -28,17 +28,11 @@ type Parameter = shape( * we can tell `MethodFieldBuilder` exactly what we want, and the runtime will successfully resolve the generic method. */ class MethodFieldBuilder extends FieldBuilder { - const type TField = shape( - 'name' => string, - 'method_name' => string, - 'output_type' => shape('type' => string, ?'needs_await' => bool), - 'parameters' => vec, - ?'root_field_for_type' => string, - ?'is_static' => bool, - ); - <<__Override>> protected function generateResolverBody(HackBuilder $hb): void { + if ($this->data['is_deprecated'] ?? false) { + $hb->add('/* HH_FIXME[4128] Deprecated */ '); + } $type_info = $this->data['output_type']; $method_name = Shapes::at($this->data, 'method_name'); $hb->addf( @@ -54,9 +48,10 @@ class MethodFieldBuilder extends FieldBuilder { } protected function generateParametersInvocation(HackBuilder $hb): void { - if (!C\is_empty($this->data['parameters'])) { + $parameters = $this->data['parameters'] ?? vec[]; + if (!C\is_empty($parameters)) { $hb->newLine()->indent(); - foreach ($this->data['parameters'] as $param) { + foreach ($parameters as $param) { $arg = $this->getArgumentInvocationString($param); $hb->addLinef('%s,', $arg); } @@ -66,7 +61,7 @@ class MethodFieldBuilder extends FieldBuilder { <<__Override>> protected function getArgumentDefinitions(): vec { - return $this->data['parameters']; + return $this->data['parameters'] ?? vec[]; } protected function getMethodCallPrefix(): string { diff --git a/src/Codegen/Builders/Fields/ShapeFieldBuilder.hack b/src/Codegen/Builders/Fields/ShapeFieldBuilder.hack index 6b1b37d..0a84cea 100644 --- a/src/Codegen/Builders/Fields/ShapeFieldBuilder.hack +++ b/src/Codegen/Builders/Fields/ShapeFieldBuilder.hack @@ -12,12 +12,6 @@ use type Facebook\HackCodegen\{HackBuilder, HackBuilderValues}; * In general, call `FieldBuilder::fromShapeField` instead of instantiating this directly. */ final class ShapeFieldBuilder extends FieldBuilder { - const type TField = shape( - 'name' => string, - 'output_type' => shape('type' => string, ?'needs_await' => bool), - 'is_optional' => bool, - ); - <<__Override>> protected function getArgumentDefinitions(): vec { return vec[]; @@ -26,6 +20,6 @@ final class ShapeFieldBuilder extends FieldBuilder { <<__Override>> protected function generateResolverBody(HackBuilder $hb): void { $name_literal = \var_export($this->data['name'], true); - $hb->addf('$parent[%s]%s', $name_literal, $this->data['is_optional'] ? ' ?? null' : ''); + $hb->addf('$parent[%s]%s', $name_literal, Shapes::idx($this->data, 'is_optional', false) ? ' ?? null' : ''); } } diff --git a/src/Codegen/Builders/ObjectBuilder.hack b/src/Codegen/Builders/ObjectBuilder.hack index 413e662..28672bc 100644 --- a/src/Codegen/Builders/ObjectBuilder.hack +++ b/src/Codegen/Builders/ObjectBuilder.hack @@ -74,13 +74,11 @@ class ObjectBuilder extends CompositeBuilder { 'type' => $edge_name.'::nonNullable()->nullableOutputListOf()', 'needs_await' => true, ), - 'parameters' => vec[], )), new MethodFieldBuilder(shape( 'name' => 'pageInfo', 'method_name' => 'getPageInfo', 'output_type' => shape('type' => 'PageInfo::nullableOutput()', 'needs_await' => true), - 'parameters' => vec[], )), ], dict[], // Connections do not implement any interfaces @@ -98,13 +96,11 @@ class ObjectBuilder extends CompositeBuilder { 'name' => 'node', 'method_name' => 'getNode', 'output_type' => shape('type' => $output_type.'::nullableOutput()'), - 'parameters' => vec[], )), new MethodFieldBuilder(shape( 'name' => 'cursor', 'method_name' => 'getCursor', 'output_type' => shape('type' => 'Types\StringType::nullableOutput()'), - 'parameters' => vec[], )), ], dict[], diff --git a/src/Field.hack b/src/Field.hack index ec775af..dd12a03 100644 --- a/src/Field.hack +++ b/src/Field.hack @@ -9,6 +9,10 @@ class Field implements \HH\MethodAttribute { public function getName(): string { return $this->name; } + + public function getDescription(): string { + return $this->description; + } } /** @@ -30,6 +34,4 @@ class Field implements \HH\MethodAttribute { * * @see https://spec.graphql.org/draft/#sec-Handling-Field-Errors */ -final class KillsParentOnException implements \HH\MethodAttribute { - public function __construct() {} -} +final class KillsParentOnException implements \HH\MethodAttribute {} diff --git a/src/FieldDefinition.hack b/src/FieldDefinition.hack index 4c965aa..a8b9f78 100644 --- a/src/FieldDefinition.hack +++ b/src/FieldDefinition.hack @@ -29,6 +29,9 @@ final class FieldDefinition implements IResolvableFiel dict, Variables, ): Awaitable) $resolver, + private ?string $description, + private bool $is_deprecated = false, + private ?string $deprecation_reason = null, ) {} public async function resolveAsync( @@ -67,18 +70,15 @@ final class FieldDefinition implements IResolvableFiel } public function getDeprecationReason(): ?string { - // TODO - return null; + return $this->deprecation_reason; } public function isDeprecated(): bool { - // TODO - return false; + return $this->is_deprecated; } public function getDescription(): ?string { - // TODO - return null; + return $this->description; } public function getArgs(): vec { diff --git a/tests/Fixtures/IntrospectionTestObjects.hack b/tests/Fixtures/IntrospectionTestObjects.hack index b3ba52e..3cb2096 100644 --- a/tests/Fixtures/IntrospectionTestObjects.hack +++ b/tests/Fixtures/IntrospectionTestObjects.hack @@ -67,7 +67,7 @@ final class IntrospectionTestObject { return null; } - <> + <> public function getNonNullInt(): int { return 1; } @@ -87,4 +87,9 @@ final class IntrospectionTestObject { return vec[null]; } + <> + public function getDeprecated(): string { + return 'deprecated'; + } + } diff --git a/tests/IntrospectionTest.hack b/tests/IntrospectionTest.hack index 1a6aadc..ad5f85d 100644 --- a/tests/IntrospectionTest.hack +++ b/tests/IntrospectionTest.hack @@ -269,6 +269,7 @@ final class IntrospectionTest extends FixtureTest { name fields { name + description type { kind name @@ -285,6 +286,8 @@ final class IntrospectionTest extends FixtureTest { } } } + isDeprecated + deprecationReason } } }', @@ -295,6 +298,7 @@ final class IntrospectionTest extends FixtureTest { 'fields' => vec[ dict[ 'name' => 'default_list_of_non_nullable_int', + 'description' => 'Default list of non nullable int', 'type' => dict[ 'kind' => 'LIST', 'name' => null, @@ -308,9 +312,12 @@ final class IntrospectionTest extends FixtureTest { ], ], ], + 'isDeprecated' => false, + 'deprecationReason' => null, ], dict[ 'name' => 'default_list_of_nullable_int', + 'description' => 'Default list of nullable int', 'type' => dict[ 'kind' => 'LIST', 'name' => null, @@ -320,17 +327,34 @@ final class IntrospectionTest extends FixtureTest { 'ofType' => null, ], ], + 'isDeprecated' => false, + 'deprecationReason' => null, ], dict[ 'name' => 'default_nullable_string', + 'description' => 'Default nullable string', + 'type' => dict[ + 'kind' => 'SCALAR', + 'name' => 'String', + 'ofType' => null, + ], + 'isDeprecated' => false, + 'deprecationReason' => null, + ], + dict[ + 'name' => 'deprecated_field', + 'description' => 'Deprecated field', 'type' => dict[ 'kind' => 'SCALAR', 'name' => 'String', 'ofType' => null, ], + 'isDeprecated' => true, + 'deprecationReason' => 'Deprecated for testing', ], dict[ 'name' => 'non_null_int', + 'description' => 'Non nullable int', 'type' => dict[ 'kind' => 'NON_NULL', 'name' => null, @@ -340,9 +364,12 @@ final class IntrospectionTest extends FixtureTest { 'ofType' => null, ], ], + 'isDeprecated' => false, + 'deprecationReason' => null, ], dict[ 'name' => 'non_null_list_of_non_null', + 'description' => 'Non nullable list of non nullables', 'type' => dict[ 'kind' => 'NON_NULL', 'name' => null, @@ -359,9 +386,12 @@ final class IntrospectionTest extends FixtureTest { ], ], ], + 'isDeprecated' => false, + 'deprecationReason' => null, ], dict[ 'name' => 'non_null_string', + 'description' => 'Non nullable string', 'type' => dict[ 'kind' => 'NON_NULL', 'name' => null, @@ -371,14 +401,19 @@ final class IntrospectionTest extends FixtureTest { 'ofType' => null, ], ], + 'isDeprecated' => false, + 'deprecationReason' => null, ], dict[ 'name' => 'nullable_string', + 'description' => 'Nullable string', 'type' => dict[ 'kind' => 'SCALAR', 'name' => 'String', 'ofType' => null, ], + 'isDeprecated' => false, + 'deprecationReason' => null, ], ], ], diff --git a/tests/gen/AlphabetConnection.hack b/tests/gen/AlphabetConnection.hack index 8f6b988..eca1e18 100644 --- a/tests/gen/AlphabetConnection.hack +++ b/tests/gen/AlphabetConnection.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<<62edee806dca502f5b400aefff59f52a>> + * @generated SignedSource<<2370253297836f5871fa800f9ed67ad6>> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -32,6 +32,9 @@ final class AlphabetConnection extends \Slack\GraphQL\Types\ObjectType { StringTypeEdge::nonNullable()->nullableOutputListOf(), dict[], async ($parent, $args, $vars) ==> await $parent->getEdges(), + null, + false, + null, ); case 'pageInfo': return new GraphQL\FieldDefinition( @@ -39,6 +42,9 @@ final class AlphabetConnection extends \Slack\GraphQL\Types\ObjectType { PageInfo::nullableOutput(), dict[], async ($parent, $args, $vars) ==> await $parent->getPageInfo(), + null, + false, + null, ); default: return null; diff --git a/tests/gen/AnotherObjectShape.hack b/tests/gen/AnotherObjectShape.hack index 1f5b18f..fb050b0 100644 --- a/tests/gen/AnotherObjectShape.hack +++ b/tests/gen/AnotherObjectShape.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<<1df6595e51f53c069509e4a7216ba04f>> + * @generated SignedSource<<25f33679953f3c7f20136a2eebb74fd0>> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -31,6 +31,9 @@ final class AnotherObjectShape extends \Slack\GraphQL\Types\ObjectType { Types\IntType::nonNullable()->nullableOutputListOf(), dict[], async ($parent, $args, $vars) ==> $parent['abc'], + null, + false, + null, ); default: return null; diff --git a/tests/gen/Bot.hack b/tests/gen/Bot.hack index aee6b1a..eea00db 100644 --- a/tests/gen/Bot.hack +++ b/tests/gen/Bot.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<<803c718476e0461c3e9d70a1db853f34>> + * @generated SignedSource<> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -36,6 +36,9 @@ final class Bot extends \Slack\GraphQL\Types\ObjectType { Types\IntType::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent->getId(), + 'ID of the user', + false, + null, ); case 'is_active': return new GraphQL\FieldDefinition( @@ -43,6 +46,9 @@ final class Bot extends \Slack\GraphQL\Types\ObjectType { Types\BooleanType::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent->isActive(), + 'Whether the user is active', + false, + null, ); case 'name': return new GraphQL\FieldDefinition( @@ -50,6 +56,9 @@ final class Bot extends \Slack\GraphQL\Types\ObjectType { Types\StringType::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent->getName(), + 'Name of the user', + false, + null, ); case 'primary_function': return new GraphQL\FieldDefinition( @@ -57,6 +66,9 @@ final class Bot extends \Slack\GraphQL\Types\ObjectType { Types\StringType::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent->getPrimaryFunction(), + 'Intended use of the bot', + false, + null, ); case 'team': return new GraphQL\FieldDefinition( @@ -64,6 +76,9 @@ final class Bot extends \Slack\GraphQL\Types\ObjectType { Team::nullableOutput(), dict[], async ($parent, $args, $vars) ==> await $parent->getTeam(), + 'Team the user belongs to', + false, + null, ); default: return null; diff --git a/tests/gen/Concrete.hack b/tests/gen/Concrete.hack index 05cbb58..7913ea9 100644 --- a/tests/gen/Concrete.hack +++ b/tests/gen/Concrete.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<<5e33a7e29516c49900df494dac33f7f5>> + * @generated SignedSource<<577219d285f266d0284809956c7984c1>> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -35,6 +35,9 @@ final class Concrete extends \Slack\GraphQL\Types\ObjectType { Types\StringType::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent->bar(), + 'bar', + false, + null, ); case 'baz': return new GraphQL\FieldDefinition( @@ -42,6 +45,9 @@ final class Concrete extends \Slack\GraphQL\Types\ObjectType { Types\StringType::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent->baz(), + 'baz', + false, + null, ); case 'foo': return new GraphQL\FieldDefinition( @@ -49,6 +55,9 @@ final class Concrete extends \Slack\GraphQL\Types\ObjectType { Types\StringType::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent->foo(), + 'foo', + false, + null, ); default: return null; diff --git a/tests/gen/ErrorTestObj.hack b/tests/gen/ErrorTestObj.hack index b2e43e0..36761f7 100644 --- a/tests/gen/ErrorTestObj.hack +++ b/tests/gen/ErrorTestObj.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<<4938ded1db5fdd04f9875088d7f4978d>> + * @generated SignedSource<<1d4cf620c9b7b67489f9a5c895199816>> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -42,6 +42,9 @@ final class ErrorTestObj extends \Slack\GraphQL\Types\ObjectType { Types\IntType::nullableOutput()->nullableOutputListOf(), dict[], async ($parent, $args, $vars) ==> $parent->bad_int_list_n_of_n(), + null, + false, + null, ); case 'bad_int_list_n_of_nn': return new GraphQL\FieldDefinition( @@ -49,6 +52,9 @@ final class ErrorTestObj extends \Slack\GraphQL\Types\ObjectType { Types\IntType::nonNullable()->nullableOutputListOf(), dict[], async ($parent, $args, $vars) ==> $parent->bad_int_list_n_of_nn(), + 'Nullability of nested types is respected, which may result in killing the whole list (but no parents)', + false, + null, ); case 'bad_int_list_nn_of_nn': return new GraphQL\FieldDefinition( @@ -56,6 +62,9 @@ final class ErrorTestObj extends \Slack\GraphQL\Types\ObjectType { Types\IntType::nonNullable()->nonNullableOutputListOf(), dict[], async ($parent, $args, $vars) ==> $parent->bad_int_list_nn_of_nn(), + null, + false, + null, ); case 'hidden_exception': return new GraphQL\FieldDefinition( @@ -63,6 +72,9 @@ final class ErrorTestObj extends \Slack\GraphQL\Types\ObjectType { Types\IntType::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent->hidden_exception(), + 'Arbitrary exceptions are hidden from clients, since they might contain sensitive data', + false, + null, ); case 'nested': return new GraphQL\FieldDefinition( @@ -70,6 +82,9 @@ final class ErrorTestObj extends \Slack\GraphQL\Types\ObjectType { ErrorTestObj::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent->nested(), + null, + false, + null, ); case 'nested_list_n_of_n': return new GraphQL\FieldDefinition( @@ -77,6 +92,9 @@ final class ErrorTestObj extends \Slack\GraphQL\Types\ObjectType { ErrorTestObj::nullableOutput()->nullableOutputListOf(), dict[], async ($parent, $args, $vars) ==> $parent->nested_list_n_of_n(), + null, + false, + null, ); case 'nested_list_n_of_nn': return new GraphQL\FieldDefinition( @@ -84,6 +102,9 @@ final class ErrorTestObj extends \Slack\GraphQL\Types\ObjectType { ErrorTestObj::nonNullable()->nullableOutputListOf(), dict[], async ($parent, $args, $vars) ==> $parent->nested_list_n_of_nn(), + null, + false, + null, ); case 'nested_list_nn_of_nn': return new GraphQL\FieldDefinition( @@ -91,6 +112,9 @@ final class ErrorTestObj extends \Slack\GraphQL\Types\ObjectType { ErrorTestObj::nonNullable()->nonNullableOutputListOf(), dict[], async ($parent, $args, $vars) ==> $parent->nested_list_nn_of_nn(), + null, + false, + null, ); case 'nested_nn': return new GraphQL\FieldDefinition( @@ -98,6 +122,9 @@ final class ErrorTestObj extends \Slack\GraphQL\Types\ObjectType { ErrorTestObj::nonNullable(), dict[], async ($parent, $args, $vars) ==> $parent->nested_nn(), + null, + false, + null, ); case 'no_error': return new GraphQL\FieldDefinition( @@ -105,6 +132,9 @@ final class ErrorTestObj extends \Slack\GraphQL\Types\ObjectType { Types\IntType::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent->no_error(), + null, + false, + null, ); case 'non_nullable': return new GraphQL\FieldDefinition( @@ -112,6 +142,9 @@ final class ErrorTestObj extends \Slack\GraphQL\Types\ObjectType { Types\IntType::nonNullable(), dict[], async ($parent, $args, $vars) ==> $parent->non_nullable(), + null, + false, + null, ); case 'user_facing_error': return new GraphQL\FieldDefinition( @@ -119,6 +152,9 @@ final class ErrorTestObj extends \Slack\GraphQL\Types\ObjectType { Types\StringType::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent->user_facing_error(), + null, + false, + null, ); default: return null; diff --git a/tests/gen/Human.hack b/tests/gen/Human.hack index e2a2d27..3e6516e 100644 --- a/tests/gen/Human.hack +++ b/tests/gen/Human.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<<453bfb5200271c708353fecfc025619b>> + * @generated SignedSource<<2d348637f5fb4c7d4c3197161f277750>> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -38,6 +38,9 @@ final class Human extends \Slack\GraphQL\Types\ObjectType { FavoriteColor::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent->getFavoriteColor(), + 'Favorite color of the user', + false, + null, ); case 'friends': return new GraphQL\FieldDefinition( @@ -71,6 +74,9 @@ final class Human extends \Slack\GraphQL\Types\ObjectType { Types\IntType::nullableInput()->coerceOptionalNamedNode('first', $args, $vars, null), Types\IntType::nullableInput()->coerceOptionalNamedNode('last', $args, $vars, null), ), + 'Friends', + false, + null, ); case 'id': return new GraphQL\FieldDefinition( @@ -78,6 +84,9 @@ final class Human extends \Slack\GraphQL\Types\ObjectType { Types\IntType::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent->getId(), + 'ID of the user', + false, + null, ); case 'is_active': return new GraphQL\FieldDefinition( @@ -85,6 +94,9 @@ final class Human extends \Slack\GraphQL\Types\ObjectType { Types\BooleanType::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent->isActive(), + 'Whether the user is active', + false, + null, ); case 'name': return new GraphQL\FieldDefinition( @@ -92,6 +104,9 @@ final class Human extends \Slack\GraphQL\Types\ObjectType { Types\StringType::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent->getName(), + 'Name of the user', + false, + null, ); case 'named_friends': return new GraphQL\FieldDefinition( @@ -131,6 +146,9 @@ final class Human extends \Slack\GraphQL\Types\ObjectType { Types\IntType::nullableInput()->coerceOptionalNamedNode('first', $args, $vars, null), Types\IntType::nullableInput()->coerceOptionalNamedNode('last', $args, $vars, null), ), + 'Test that we can pass args to a field which returns a connection', + false, + null, ); case 'team': return new GraphQL\FieldDefinition( @@ -138,6 +156,9 @@ final class Human extends \Slack\GraphQL\Types\ObjectType { Team::nullableOutput(), dict[], async ($parent, $args, $vars) ==> await $parent->getTeam(), + 'Team the user belongs to', + false, + null, ); default: return null; diff --git a/tests/gen/InterfaceA.hack b/tests/gen/InterfaceA.hack index ba89bb8..4a7f472 100644 --- a/tests/gen/InterfaceA.hack +++ b/tests/gen/InterfaceA.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<<2692931475deaf2db40669c79479288f>> + * @generated SignedSource<<6756acff30bedd1490b4d6978405f41b>> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -32,6 +32,9 @@ final class InterfaceA extends \Slack\GraphQL\Types\InterfaceType { Types\StringType::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent->foo(), + 'foo', + false, + null, ); default: return null; diff --git a/tests/gen/InterfaceB.hack b/tests/gen/InterfaceB.hack index 483b134..8c86c7a 100644 --- a/tests/gen/InterfaceB.hack +++ b/tests/gen/InterfaceB.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<> + * @generated SignedSource<<1f788ce977e0e0bfec24cddd157447ee>> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -33,6 +33,9 @@ final class InterfaceB extends \Slack\GraphQL\Types\InterfaceType { Types\StringType::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent->bar(), + 'bar', + false, + null, ); case 'foo': return new GraphQL\FieldDefinition( @@ -40,6 +43,9 @@ final class InterfaceB extends \Slack\GraphQL\Types\InterfaceType { Types\StringType::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent->foo(), + 'foo', + false, + null, ); default: return null; diff --git a/tests/gen/IntrospectionTestObject.hack b/tests/gen/IntrospectionTestObject.hack index 7a1644b..a8ac9a9 100644 --- a/tests/gen/IntrospectionTestObject.hack +++ b/tests/gen/IntrospectionTestObject.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<<2ec633867a1874f20746329c497145ab>> + * @generated SignedSource<<45b21ac4d00e32c0f7a4fbbccca123d1>> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -19,6 +19,7 @@ final class IntrospectionTestObject extends \Slack\GraphQL\Types\ObjectType { 'default_list_of_non_nullable_int', 'default_list_of_nullable_int', 'default_nullable_string', + 'deprecated_field', 'non_null_int', 'non_null_list_of_non_null', 'non_null_string', @@ -37,6 +38,9 @@ final class IntrospectionTestObject extends \Slack\GraphQL\Types\ObjectType { Types\IntType::nonNullable()->nullableOutputListOf(), dict[], async ($parent, $args, $vars) ==> $parent->getDefaultListOfNonNullableInt(), + 'Default list of non nullable int', + false, + null, ); case 'default_list_of_nullable_int': return new GraphQL\FieldDefinition( @@ -44,6 +48,9 @@ final class IntrospectionTestObject extends \Slack\GraphQL\Types\ObjectType { Types\IntType::nullableOutput()->nullableOutputListOf(), dict[], async ($parent, $args, $vars) ==> $parent->getDefaultListOfNullableInt(), + 'Default list of nullable int', + false, + null, ); case 'default_nullable_string': return new GraphQL\FieldDefinition( @@ -51,6 +58,19 @@ final class IntrospectionTestObject extends \Slack\GraphQL\Types\ObjectType { Types\StringType::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent->getDefaultNullableString(), + 'Default nullable string', + false, + null, + ); + case 'deprecated_field': + return new GraphQL\FieldDefinition( + 'deprecated_field', + Types\StringType::nullableOutput(), + dict[], + async ($parent, $args, $vars) ==> /* HH_FIXME[4128] Deprecated */ $parent->getDeprecated(), + 'Deprecated field', + true, + 'Deprecated for testing', ); case 'non_null_int': return new GraphQL\FieldDefinition( @@ -58,6 +78,9 @@ final class IntrospectionTestObject extends \Slack\GraphQL\Types\ObjectType { Types\IntType::nonNullable(), dict[], async ($parent, $args, $vars) ==> $parent->getNonNullInt(), + 'Non nullable int', + false, + null, ); case 'non_null_list_of_non_null': return new GraphQL\FieldDefinition( @@ -65,6 +88,9 @@ final class IntrospectionTestObject extends \Slack\GraphQL\Types\ObjectType { Types\IntType::nonNullable()->nonNullableOutputListOf(), dict[], async ($parent, $args, $vars) ==> $parent->getNonNullListOfNonNull(), + 'Non nullable list of non nullables', + false, + null, ); case 'non_null_string': return new GraphQL\FieldDefinition( @@ -72,6 +98,9 @@ final class IntrospectionTestObject extends \Slack\GraphQL\Types\ObjectType { Types\StringType::nonNullable(), dict[], async ($parent, $args, $vars) ==> $parent->getNonNullString(), + 'Non nullable string', + false, + null, ); case 'nullable_string': return new GraphQL\FieldDefinition( @@ -79,6 +108,9 @@ final class IntrospectionTestObject extends \Slack\GraphQL\Types\ObjectType { Types\StringType::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent->getNullableString(), + 'Nullable string', + false, + null, ); default: return null; diff --git a/tests/gen/Mutation.hack b/tests/gen/Mutation.hack index 5a134de..db4a9de 100644 --- a/tests/gen/Mutation.hack +++ b/tests/gen/Mutation.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<<8effc458f88d700e19fc5f34452ec88f>> + * @generated SignedSource<<540c6978daeb3114ca2cdd32f05c0b40>> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -39,6 +39,9 @@ final class Mutation extends \Slack\GraphQL\Types\ObjectType { async ($parent, $args, $vars) ==> await \UserMutationAttributes::createUser( CreateUserInput::nonNullable()->coerceNamedNode('input', $args, $vars), ), + 'Create a new user', + false, + null, ); case 'pokeUser': return new GraphQL\FieldDefinition( @@ -53,6 +56,9 @@ final class Mutation extends \Slack\GraphQL\Types\ObjectType { async ($parent, $args, $vars) ==> await \UserMutationAttributes::pokeUser( Types\IntType::nonNullable()->coerceNamedNode('id', $args, $vars), ), + 'Poke a user by ID', + false, + null, ); default: return null; diff --git a/tests/gen/NestedOutputShape.hack b/tests/gen/NestedOutputShape.hack index 389f7c5..3ffdfec 100644 --- a/tests/gen/NestedOutputShape.hack +++ b/tests/gen/NestedOutputShape.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<<5e9816ae88463151bbbadeb9b46700a7>> + * @generated SignedSource<<60378da7864209b678dac669afa300e5>> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -31,6 +31,9 @@ final class NestedOutputShape extends \Slack\GraphQL\Types\ObjectType { Types\StringType::nonNullable()->nullableOutputListOf(), dict[], async ($parent, $args, $vars) ==> $parent['vec_of_string'], + null, + false, + null, ); default: return null; diff --git a/tests/gen/ObjectShape.hack b/tests/gen/ObjectShape.hack index 9b63d57..a42e6db 100644 --- a/tests/gen/ObjectShape.hack +++ b/tests/gen/ObjectShape.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<<4ee05a200f698afc8c2432c2a1b97359>> + * @generated SignedSource<<2487726e184cab0d444933d8ad6374d9>> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -33,6 +33,9 @@ final class ObjectShape extends \Slack\GraphQL\Types\ObjectType { Types\IntType::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent['foo'], + null, + false, + null, ); case 'bar': return new GraphQL\FieldDefinition( @@ -40,6 +43,9 @@ final class ObjectShape extends \Slack\GraphQL\Types\ObjectType { Types\StringType::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent['bar'] ?? null, + null, + false, + null, ); case 'baz': return new GraphQL\FieldDefinition( @@ -47,6 +53,9 @@ final class ObjectShape extends \Slack\GraphQL\Types\ObjectType { AnotherObjectShape::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent['baz'], + null, + false, + null, ); default: return null; diff --git a/tests/gen/OutputShape.hack b/tests/gen/OutputShape.hack index 10c4a20..d66888b 100644 --- a/tests/gen/OutputShape.hack +++ b/tests/gen/OutputShape.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<> + * @generated SignedSource<<770a964ed4e4c9d2deeec1bf37577248>> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -33,6 +33,9 @@ final class OutputShape extends \Slack\GraphQL\Types\ObjectType { Types\StringType::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent['string'], + null, + false, + null, ); case 'vec_of_int': return new GraphQL\FieldDefinition( @@ -40,6 +43,9 @@ final class OutputShape extends \Slack\GraphQL\Types\ObjectType { Types\IntType::nonNullable()->nullableOutputListOf(), dict[], async ($parent, $args, $vars) ==> $parent['vec_of_int'], + null, + false, + null, ); case 'nested_shape': return new GraphQL\FieldDefinition( @@ -47,6 +53,9 @@ final class OutputShape extends \Slack\GraphQL\Types\ObjectType { NestedOutputShape::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent['nested_shape'], + null, + false, + null, ); default: return null; diff --git a/tests/gen/OutputTypeTestObj.hack b/tests/gen/OutputTypeTestObj.hack index aab4325..1930fdd 100644 --- a/tests/gen/OutputTypeTestObj.hack +++ b/tests/gen/OutputTypeTestObj.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<> + * @generated SignedSource<<0d8ff776164898a181cc11215e760e78>> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -38,6 +38,9 @@ final class OutputTypeTestObj extends \Slack\GraphQL\Types\ObjectType { Types\IntType::nullableOutput(), dict[], async ($parent, $args, $vars) ==> await $parent->awaitable(), + null, + false, + null, ); case 'awaitable_nullable': return new GraphQL\FieldDefinition( @@ -45,6 +48,9 @@ final class OutputTypeTestObj extends \Slack\GraphQL\Types\ObjectType { Types\StringType::nullableOutput(), dict[], async ($parent, $args, $vars) ==> await $parent->awaitable_nullable(), + null, + false, + null, ); case 'awaitable_nullable_list': return new GraphQL\FieldDefinition( @@ -52,6 +58,9 @@ final class OutputTypeTestObj extends \Slack\GraphQL\Types\ObjectType { Types\IntType::nonNullable()->nullableOutputListOf(), dict[], async ($parent, $args, $vars) ==> await $parent->awaitable_nullable_list(), + null, + false, + null, ); case 'list': return new GraphQL\FieldDefinition( @@ -59,6 +68,9 @@ final class OutputTypeTestObj extends \Slack\GraphQL\Types\ObjectType { Types\StringType::nonNullable()->nullableOutputListOf(), dict[], async ($parent, $args, $vars) ==> $parent->list(), + null, + false, + null, ); case 'nested_lists': return new GraphQL\FieldDefinition( @@ -66,6 +78,9 @@ final class OutputTypeTestObj extends \Slack\GraphQL\Types\ObjectType { Types\IntType::nullableOutput()->nonNullableOutputListOf()->nullableOutputListOf()->nullableOutputListOf(), dict[], async ($parent, $args, $vars) ==> $parent->nested_lists(), + 'Note that nested lists can be non-nullable', + false, + null, ); case 'nullable': return new GraphQL\FieldDefinition( @@ -73,6 +88,9 @@ final class OutputTypeTestObj extends \Slack\GraphQL\Types\ObjectType { Types\StringType::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent->nullable(), + null, + false, + null, ); case 'output_shape': return new GraphQL\FieldDefinition( @@ -80,6 +98,9 @@ final class OutputTypeTestObj extends \Slack\GraphQL\Types\ObjectType { OutputShape::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent->output_shape(), + null, + false, + null, ); case 'scalar': return new GraphQL\FieldDefinition( @@ -87,6 +108,9 @@ final class OutputTypeTestObj extends \Slack\GraphQL\Types\ObjectType { Types\IntType::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent->scalar(), + 'Note that the GraphQL field will be nullable by default, despite its non-nullable Hack type', + false, + null, ); default: return null; diff --git a/tests/gen/PageInfo.hack b/tests/gen/PageInfo.hack index 93c39c7..7bd3d2b 100644 --- a/tests/gen/PageInfo.hack +++ b/tests/gen/PageInfo.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<> + * @generated SignedSource<> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -34,6 +34,9 @@ final class PageInfo extends \Slack\GraphQL\Types\ObjectType { Types\StringType::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent['startCursor'] ?? null, + null, + false, + null, ); case 'endCursor': return new GraphQL\FieldDefinition( @@ -41,6 +44,9 @@ final class PageInfo extends \Slack\GraphQL\Types\ObjectType { Types\StringType::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent['endCursor'] ?? null, + null, + false, + null, ); case 'hasPreviousPage': return new GraphQL\FieldDefinition( @@ -48,6 +54,9 @@ final class PageInfo extends \Slack\GraphQL\Types\ObjectType { Types\BooleanType::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent['hasPreviousPage'] ?? null, + null, + false, + null, ); case 'hasNextPage': return new GraphQL\FieldDefinition( @@ -55,6 +64,9 @@ final class PageInfo extends \Slack\GraphQL\Types\ObjectType { Types\BooleanType::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent['hasNextPage'] ?? null, + null, + false, + null, ); default: return null; diff --git a/tests/gen/Query.hack b/tests/gen/Query.hack index 9da502b..0cf9839 100644 --- a/tests/gen/Query.hack +++ b/tests/gen/Query.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<> + * @generated SignedSource<<067275aa67c4d0b5123b0d4bec136ff8>> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -48,6 +48,9 @@ final class Query extends \Slack\GraphQL\Types\ObjectType { __Schema::nullableOutput(), dict[], async ($parent, $args, $vars) ==> new Schema(), + null, + false, + null, ); case '__type': return new GraphQL\FieldDefinition( @@ -63,6 +66,9 @@ final class Query extends \Slack\GraphQL\Types\ObjectType { Types\StringType::nonNullable()->coerceNamedNode('name', $args, $vars), ), + null, + false, + null, ); case 'alphabetConnection': return new GraphQL\FieldDefinition( @@ -96,6 +102,9 @@ final class Query extends \Slack\GraphQL\Types\ObjectType { Types\IntType::nullableInput()->coerceOptionalNamedNode('first', $args, $vars, null), Types\IntType::nullableInput()->coerceOptionalNamedNode('last', $args, $vars, null), ), + 'Test for list connection', + false, + null, ); case 'arg_test': return new GraphQL\FieldDefinition( @@ -121,6 +130,9 @@ final class Query extends \Slack\GraphQL\Types\ObjectType { Types\IntType::nullableInput()->coerceNamedNode('nullable', $args, $vars), Types\IntType::nullableInput()->coerceOptionalNamedNode('optional', $args, $vars, 42), ), + 'Root field for testing arguments', + false, + null, ); case 'bot': return new GraphQL\FieldDefinition( @@ -135,6 +147,9 @@ final class Query extends \Slack\GraphQL\Types\ObjectType { async ($parent, $args, $vars) ==> await \UserQueryAttributes::getBot( Types\IntType::nonNullable()->coerceNamedNode('id', $args, $vars), ), + 'Fetch a bot by ID', + false, + null, ); case 'error_test': return new GraphQL\FieldDefinition( @@ -142,6 +157,9 @@ final class Query extends \Slack\GraphQL\Types\ObjectType { ErrorTestObj::nullableOutput(), dict[], async ($parent, $args, $vars) ==> \ErrorTestObj::get(), + 'Root field to get an instance', + false, + null, ); case 'error_test_nn': return new GraphQL\FieldDefinition( @@ -149,6 +167,9 @@ final class Query extends \Slack\GraphQL\Types\ObjectType { ErrorTestObj::nonNullable(), dict[], async ($parent, $args, $vars) ==> \ErrorTestObj::getNonNullable(), + 'A non-nullable root field to get an instance', + false, + null, ); case 'getConcrete': return new GraphQL\FieldDefinition( @@ -156,6 +177,9 @@ final class Query extends \Slack\GraphQL\Types\ObjectType { Concrete::nullableOutput(), dict[], async ($parent, $args, $vars) ==> \Concrete::getConcrete(), + 'Root field to get an instance of Concrete', + false, + null, ); case 'getInterfaceA': return new GraphQL\FieldDefinition( @@ -163,6 +187,9 @@ final class Query extends \Slack\GraphQL\Types\ObjectType { InterfaceA::nullableOutput(), dict[], async ($parent, $args, $vars) ==> \Concrete::getInterfaceA(), + 'Root field to get an instance of InterfaceA', + false, + null, ); case 'getInterfaceB': return new GraphQL\FieldDefinition( @@ -170,6 +197,9 @@ final class Query extends \Slack\GraphQL\Types\ObjectType { InterfaceB::nullableOutput(), dict[], async ($parent, $args, $vars) ==> \Concrete::getInterfaceB(), + 'Root field to get an instance of InterfaceB', + false, + null, ); case 'getObjectShape': return new GraphQL\FieldDefinition( @@ -177,6 +207,9 @@ final class Query extends \Slack\GraphQL\Types\ObjectType { ObjectShape::nullableOutput(), dict[], async ($parent, $args, $vars) ==> \ObjectTypeTestEntrypoint::getObjectShape(), + 'fetch an object shape', + false, + null, ); case 'human': return new GraphQL\FieldDefinition( @@ -191,6 +224,9 @@ final class Query extends \Slack\GraphQL\Types\ObjectType { async ($parent, $args, $vars) ==> await \UserQueryAttributes::getHuman( Types\IntType::nonNullable()->coerceNamedNode('id', $args, $vars), ), + 'Fetch a user by ID', + false, + null, ); case 'introspection_test': return new GraphQL\FieldDefinition( @@ -198,6 +234,9 @@ final class Query extends \Slack\GraphQL\Types\ObjectType { IntrospectionTestObject::nullableOutput(), dict[], async ($parent, $args, $vars) ==> \IntrospectionTestObject::get(), + 'Root field to get an instance', + false, + null, ); case 'list_arg_test': return new GraphQL\FieldDefinition( @@ -212,6 +251,9 @@ final class Query extends \Slack\GraphQL\Types\ObjectType { async ($parent, $args, $vars) ==> \ArgumentTestObj::listArgTest( Types\IntType::nonNullable()->nullableInputListOf()->nonNullableInputListOf()->nullableInputListOf()->coerceNamedNode('arg', $args, $vars), ), + 'Root field for testing list arguments', + false, + null, ); case 'nested_list_sum': return new GraphQL\FieldDefinition( @@ -226,6 +268,9 @@ final class Query extends \Slack\GraphQL\Types\ObjectType { async ($parent, $args, $vars) ==> \UserQueryAttributes::getNestedListSum( Types\IntType::nonNullable()->nonNullableInputListOf()->nonNullableInputListOf()->coerceNamedNode('numbers', $args, $vars), ), + 'Test for nested list arguments', + false, + null, ); case 'optional_field_test': return new GraphQL\FieldDefinition( @@ -240,6 +285,9 @@ final class Query extends \Slack\GraphQL\Types\ObjectType { async ($parent, $args, $vars) ==> \UserQueryAttributes::optionalFieldTest( CreateUserInput::nonNullable()->coerceNamedNode('input', $args, $vars), ), + 'Test for an optional input object field', + false, + null, ); case 'output_type_test': return new GraphQL\FieldDefinition( @@ -247,6 +295,9 @@ final class Query extends \Slack\GraphQL\Types\ObjectType { OutputTypeTestObj::nullableOutput(), dict[], async ($parent, $args, $vars) ==> \OutputTypeTestObj::get(), + 'Root field to get an instance', + false, + null, ); case 'takes_favorite_color': return new GraphQL\FieldDefinition( @@ -261,6 +312,9 @@ final class Query extends \Slack\GraphQL\Types\ObjectType { async ($parent, $args, $vars) ==> \UserQueryAttributes::takesFavoriteColor( FavoriteColor::nonNullable()->coerceNamedNode('favorite_color', $args, $vars), ), + 'Test for enum arguments', + false, + null, ); case 'user': return new GraphQL\FieldDefinition( @@ -275,6 +329,9 @@ final class Query extends \Slack\GraphQL\Types\ObjectType { async ($parent, $args, $vars) ==> await \UserQueryAttributes::getUser( Types\IntType::nonNullable()->coerceNamedNode('id', $args, $vars), ), + 'Fetch a user by ID', + false, + null, ); case 'viewer': return new GraphQL\FieldDefinition( @@ -282,6 +339,9 @@ final class Query extends \Slack\GraphQL\Types\ObjectType { User::nullableOutput(), dict[], async ($parent, $args, $vars) ==> await \UserQueryAttributes::getViewer(), + 'Authenticated viewer', + false, + null, ); default: return null; diff --git a/tests/gen/StringTypeEdge.hack b/tests/gen/StringTypeEdge.hack index 27333d5..76b0c7b 100644 --- a/tests/gen/StringTypeEdge.hack +++ b/tests/gen/StringTypeEdge.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<<9edbef9197acde53464ef3e6c06253e3>> + * @generated SignedSource<<35211b3a6d5dfa2888824c500024d226>> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -32,6 +32,9 @@ final class StringTypeEdge extends \Slack\GraphQL\Types\ObjectType { Types\StringType::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent->getNode(), + null, + false, + null, ); case 'cursor': return new GraphQL\FieldDefinition( @@ -39,6 +42,9 @@ final class StringTypeEdge extends \Slack\GraphQL\Types\ObjectType { Types\StringType::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent->getCursor(), + null, + false, + null, ); default: return null; diff --git a/tests/gen/Team.hack b/tests/gen/Team.hack index d541d9d..d777873 100644 --- a/tests/gen/Team.hack +++ b/tests/gen/Team.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<<42f8451c72c0c7713661e2da057f8902>> + * @generated SignedSource<<4f9d8cbae367577036392dff97a6275d>> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -41,6 +41,9 @@ final class Team extends \Slack\GraphQL\Types\ObjectType { async ($parent, $args, $vars) ==> $parent->getDescription( Types\BooleanType::nonNullable()->coerceNamedNode('short', $args, $vars), ), + 'Description of the team', + false, + null, ); case 'id': return new GraphQL\FieldDefinition( @@ -48,6 +51,9 @@ final class Team extends \Slack\GraphQL\Types\ObjectType { Types\IntType::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent->getId(), + 'ID of the team', + false, + null, ); case 'name': return new GraphQL\FieldDefinition( @@ -55,6 +61,9 @@ final class Team extends \Slack\GraphQL\Types\ObjectType { Types\StringType::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent->getName(), + 'Name of the team', + false, + null, ); case 'num_users': return new GraphQL\FieldDefinition( @@ -62,6 +71,9 @@ final class Team extends \Slack\GraphQL\Types\ObjectType { Types\IntType::nullableOutput(), dict[], async ($parent, $args, $vars) ==> await $parent->getNumUsers(), + 'Number of users on the team', + false, + null, ); default: return null; diff --git a/tests/gen/User.hack b/tests/gen/User.hack index 77678fb..a1d7946 100644 --- a/tests/gen/User.hack +++ b/tests/gen/User.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<<481a5396998f1863b06a6992d837fe3b>> + * @generated SignedSource<<9cba384158f3aba76251dad8ebed7202>> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -36,6 +36,9 @@ final class User extends \Slack\GraphQL\Types\InterfaceType { Types\IntType::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent->getId(), + 'ID of the user', + false, + null, ); case 'is_active': return new GraphQL\FieldDefinition( @@ -43,6 +46,9 @@ final class User extends \Slack\GraphQL\Types\InterfaceType { Types\BooleanType::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent->isActive(), + 'Whether the user is active', + false, + null, ); case 'name': return new GraphQL\FieldDefinition( @@ -50,6 +56,9 @@ final class User extends \Slack\GraphQL\Types\InterfaceType { Types\StringType::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent->getName(), + 'Name of the user', + false, + null, ); case 'team': return new GraphQL\FieldDefinition( @@ -57,6 +66,9 @@ final class User extends \Slack\GraphQL\Types\InterfaceType { Team::nullableOutput(), dict[], async ($parent, $args, $vars) ==> await $parent->getTeam(), + 'Team the user belongs to', + false, + null, ); default: return null; diff --git a/tests/gen/UserConnection.hack b/tests/gen/UserConnection.hack index f43672f..b196fcc 100644 --- a/tests/gen/UserConnection.hack +++ b/tests/gen/UserConnection.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<<10f75bca86cba0f89742c4b2faf55f99>> + * @generated SignedSource<> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -32,6 +32,9 @@ final class UserConnection extends \Slack\GraphQL\Types\ObjectType { UserEdge::nonNullable()->nullableOutputListOf(), dict[], async ($parent, $args, $vars) ==> await $parent->getEdges(), + null, + false, + null, ); case 'pageInfo': return new GraphQL\FieldDefinition( @@ -39,6 +42,9 @@ final class UserConnection extends \Slack\GraphQL\Types\ObjectType { PageInfo::nullableOutput(), dict[], async ($parent, $args, $vars) ==> await $parent->getPageInfo(), + null, + false, + null, ); default: return null; diff --git a/tests/gen/UserEdge.hack b/tests/gen/UserEdge.hack index f19bb53..131f19c 100644 --- a/tests/gen/UserEdge.hack +++ b/tests/gen/UserEdge.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<<10bd530f34fa766a0c89a1f81e8f8ad3>> + * @generated SignedSource<<6735de87aced1c81ab2e5da96041da0d>> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -32,6 +32,9 @@ final class UserEdge extends \Slack\GraphQL\Types\ObjectType { User::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent->getNode(), + null, + false, + null, ); case 'cursor': return new GraphQL\FieldDefinition( @@ -39,6 +42,9 @@ final class UserEdge extends \Slack\GraphQL\Types\ObjectType { Types\StringType::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent->getCursor(), + null, + false, + null, ); default: return null; diff --git a/tests/gen/__Directive.hack b/tests/gen/__Directive.hack index 4853811..d4ac4c4 100644 --- a/tests/gen/__Directive.hack +++ b/tests/gen/__Directive.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<> + * @generated SignedSource<<5dbdcd141b9db786ce8b63cb9cddd3f4>> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -34,6 +34,9 @@ final class __Directive extends \Slack\GraphQL\Types\ObjectType { Types\StringType::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent['name'], + null, + false, + null, ); case 'description': return new GraphQL\FieldDefinition( @@ -41,6 +44,9 @@ final class __Directive extends \Slack\GraphQL\Types\ObjectType { Types\StringType::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent['description'], + null, + false, + null, ); case 'locations': return new GraphQL\FieldDefinition( @@ -48,6 +54,9 @@ final class __Directive extends \Slack\GraphQL\Types\ObjectType { Types\StringType::nonNullable()->nullableOutputListOf(), dict[], async ($parent, $args, $vars) ==> $parent['locations'], + null, + false, + null, ); case 'args': return new GraphQL\FieldDefinition( @@ -55,6 +64,9 @@ final class __Directive extends \Slack\GraphQL\Types\ObjectType { __InputValue::nonNullable()->nullableOutputListOf(), dict[], async ($parent, $args, $vars) ==> $parent['args'], + null, + false, + null, ); default: return null; diff --git a/tests/gen/__EnumValue.hack b/tests/gen/__EnumValue.hack index 7c8dfd0..3404b89 100644 --- a/tests/gen/__EnumValue.hack +++ b/tests/gen/__EnumValue.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<<2a376d1323cd8b83e6af8c63aa02034c>> + * @generated SignedSource<<24a17dee77b7b44ce4810934086df012>> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -34,6 +34,9 @@ final class __EnumValue extends \Slack\GraphQL\Types\ObjectType { Types\StringType::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent['name'], + null, + false, + null, ); case 'isDeprecated': return new GraphQL\FieldDefinition( @@ -41,6 +44,9 @@ final class __EnumValue extends \Slack\GraphQL\Types\ObjectType { Types\BooleanType::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent['isDeprecated'], + null, + false, + null, ); case 'description': return new GraphQL\FieldDefinition( @@ -48,6 +54,9 @@ final class __EnumValue extends \Slack\GraphQL\Types\ObjectType { Types\StringType::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent['description'] ?? null, + null, + false, + null, ); case 'deprecationReason': return new GraphQL\FieldDefinition( @@ -55,6 +64,9 @@ final class __EnumValue extends \Slack\GraphQL\Types\ObjectType { Types\StringType::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent['deprecationReason'] ?? null, + null, + false, + null, ); default: return null; diff --git a/tests/gen/__Field.hack b/tests/gen/__Field.hack index dd48c35..046a713 100644 --- a/tests/gen/__Field.hack +++ b/tests/gen/__Field.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<<1d6ae474d70729d9c6200f3336b331be>> + * @generated SignedSource<<7a4c88e2f4532732ddad9264db61c821>> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -36,6 +36,9 @@ final class __Field extends \Slack\GraphQL\Types\ObjectType { __InputValue::nonNullable()->nullableOutputListOf(), dict[], async ($parent, $args, $vars) ==> $parent->getArgs(), + 'Args of the field', + false, + null, ); case 'deprecationReason': return new GraphQL\FieldDefinition( @@ -43,6 +46,9 @@ final class __Field extends \Slack\GraphQL\Types\ObjectType { Types\StringType::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent->getDeprecationReason(), + 'Reason the field was deprecated', + false, + null, ); case 'description': return new GraphQL\FieldDefinition( @@ -50,6 +56,9 @@ final class __Field extends \Slack\GraphQL\Types\ObjectType { Types\StringType::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent->getDescription(), + 'Description of the field', + false, + null, ); case 'isDeprecated': return new GraphQL\FieldDefinition( @@ -57,6 +66,9 @@ final class __Field extends \Slack\GraphQL\Types\ObjectType { Types\BooleanType::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent->isDeprecated(), + 'Boolean for whether or not the field is deprecated', + false, + null, ); case 'name': return new GraphQL\FieldDefinition( @@ -64,6 +76,9 @@ final class __Field extends \Slack\GraphQL\Types\ObjectType { Types\StringType::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent->getName(), + 'Name of the field', + false, + null, ); case 'type': return new GraphQL\FieldDefinition( @@ -71,6 +86,9 @@ final class __Field extends \Slack\GraphQL\Types\ObjectType { __Type::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent->getType(), + 'Type of the field', + false, + null, ); default: return null; diff --git a/tests/gen/__InputValue.hack b/tests/gen/__InputValue.hack index 84df0d3..4b1c209 100644 --- a/tests/gen/__InputValue.hack +++ b/tests/gen/__InputValue.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<> + * @generated SignedSource<<5fbbae6803b3528b0eb9b8f4f09a0d2e>> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -34,6 +34,9 @@ final class __InputValue extends \Slack\GraphQL\Types\ObjectType { Types\StringType::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent['name'], + null, + false, + null, ); case 'description': return new GraphQL\FieldDefinition( @@ -41,6 +44,9 @@ final class __InputValue extends \Slack\GraphQL\Types\ObjectType { Types\StringType::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent['description'] ?? null, + null, + false, + null, ); case 'type': return new GraphQL\FieldDefinition( @@ -48,6 +54,9 @@ final class __InputValue extends \Slack\GraphQL\Types\ObjectType { __Type::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent['type'], + null, + false, + null, ); case 'defaultValue': return new GraphQL\FieldDefinition( @@ -55,6 +64,9 @@ final class __InputValue extends \Slack\GraphQL\Types\ObjectType { Types\StringType::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent['defaultValue'] ?? null, + null, + false, + null, ); default: return null; diff --git a/tests/gen/__Schema.hack b/tests/gen/__Schema.hack index a254d4f..bff774e 100644 --- a/tests/gen/__Schema.hack +++ b/tests/gen/__Schema.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<> + * @generated SignedSource<> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -35,6 +35,9 @@ final class __Schema extends \Slack\GraphQL\Types\ObjectType { __Directive::nonNullable()->nullableOutputListOf(), dict[], async ($parent, $args, $vars) ==> $parent->getDirectives(), + 'Directives supported by the schema', + false, + null, ); case 'mutationType': return new GraphQL\FieldDefinition( @@ -42,6 +45,9 @@ final class __Schema extends \Slack\GraphQL\Types\ObjectType { __Type::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent->getIntrospectionMutationType(), + 'Mutation root type', + false, + null, ); case 'queryType': return new GraphQL\FieldDefinition( @@ -49,6 +55,9 @@ final class __Schema extends \Slack\GraphQL\Types\ObjectType { __Type::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent->getIntrospectionQueryType(), + 'Query root type', + false, + null, ); case 'subscriptionType': return new GraphQL\FieldDefinition( @@ -56,6 +65,9 @@ final class __Schema extends \Slack\GraphQL\Types\ObjectType { __Type::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent->getIntrospectionSubscriptionType(), + 'Subscription root type', + false, + null, ); case 'types': return new GraphQL\FieldDefinition( @@ -63,6 +75,9 @@ final class __Schema extends \Slack\GraphQL\Types\ObjectType { __Type::nonNullable()->nullableOutputListOf(), dict[], async ($parent, $args, $vars) ==> $parent->getTypes(), + 'Types contained within the schema', + false, + null, ); default: return null; diff --git a/tests/gen/__Type.hack b/tests/gen/__Type.hack index 05376fb..a3b776e 100644 --- a/tests/gen/__Type.hack +++ b/tests/gen/__Type.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<<46725fb0d0175c7f30579a28e030cf3b>> + * @generated SignedSource<<48a05c7de06f421d045fa09aaa1da78e>> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -39,6 +39,9 @@ final class __Type extends \Slack\GraphQL\Types\ObjectType { Types\StringType::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent->getIntrospectionDescription(), + 'Description of the type', + false, + null, ); case 'enumValues': return new GraphQL\FieldDefinition( @@ -54,6 +57,9 @@ final class __Type extends \Slack\GraphQL\Types\ObjectType { async ($parent, $args, $vars) ==> $parent->getIntrospectionEnumValues( Types\BooleanType::nonNullable()->coerceOptionalNamedNode('includeDeprecated', $args, $vars, false), ), + 'Enum values, only applies to ENUM', + false, + null, ); case 'fields': return new GraphQL\FieldDefinition( @@ -69,6 +75,9 @@ final class __Type extends \Slack\GraphQL\Types\ObjectType { async ($parent, $args, $vars) ==> $parent->getIntrospectionFields( Types\BooleanType::nonNullable()->coerceOptionalNamedNode('includeDeprecated', $args, $vars, false), ), + 'Fields of the type, only applies to OBJECT and INTERFACE', + false, + null, ); case 'inputFields': return new GraphQL\FieldDefinition( @@ -76,6 +85,9 @@ final class __Type extends \Slack\GraphQL\Types\ObjectType { __InputValue::nonNullable()->nullableOutputListOf(), dict[], async ($parent, $args, $vars) ==> $parent->getIntrospectionInputFields(), + 'Input fields, only applies to INPUT_OBJECT', + false, + null, ); case 'interfaces': return new GraphQL\FieldDefinition( @@ -83,6 +95,9 @@ final class __Type extends \Slack\GraphQL\Types\ObjectType { __Type::nonNullable()->nullableOutputListOf(), dict[], async ($parent, $args, $vars) ==> $parent->getIntrospectionInterfaces(), + 'Interfaces the object implements, only applies to OBJECT', + false, + null, ); case 'kind': return new GraphQL\FieldDefinition( @@ -90,6 +105,9 @@ final class __Type extends \Slack\GraphQL\Types\ObjectType { __TypeKind::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent->getIntrospectionKind(), + 'Kind of the type', + false, + null, ); case 'name': return new GraphQL\FieldDefinition( @@ -97,6 +115,9 @@ final class __Type extends \Slack\GraphQL\Types\ObjectType { Types\StringType::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent->getIntrospectionName(), + 'Name of the type', + false, + null, ); case 'ofType': return new GraphQL\FieldDefinition( @@ -104,6 +125,9 @@ final class __Type extends \Slack\GraphQL\Types\ObjectType { __Type::nullableOutput(), dict[], async ($parent, $args, $vars) ==> $parent->getIntrospectionOfType(), + 'Underlying wrapped type, only applies to NON_NULL and LIST', + false, + null, ); case 'possibleTypes': return new GraphQL\FieldDefinition( @@ -111,6 +135,9 @@ final class __Type extends \Slack\GraphQL\Types\ObjectType { __Type::nonNullable()->nullableOutputListOf(), dict[], async ($parent, $args, $vars) ==> $parent->getIntrospectionPossibleTypes(), + 'Possible types that implement this interface, only applies to INTERFACE', + false, + null, ); default: return null; diff --git a/tests/schema.json b/tests/schema.json index b1f1807..c155945 100644 --- a/tests/schema.json +++ b/tests/schema.json @@ -1091,6 +1091,17 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "deprecated_field", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "Deprecated for testing" + }, { "name": "non_null_int", "args": [], From a2bef68d62a72c134d5d017aa6877d377adb1d6c Mon Sep 17 00:00:00 2001 From: Ian Hoffman Date: Wed, 22 Sep 2021 16:20:35 -0700 Subject: [PATCH 2/2] simplify --- src/Codegen/Builders/Fields/FieldBuilder.hack | 18 ++++----------- .../Builders/Fields/MethodFieldBuilder.hack | 2 +- src/FieldDefinition.hack | 3 +-- tests/gen/AlphabetConnection.hack | 4 +--- tests/gen/AnotherObjectShape.hack | 3 +-- tests/gen/Bot.hack | 7 +----- tests/gen/Concrete.hack | 5 +---- tests/gen/ErrorTestObj.hack | 14 +----------- tests/gen/Human.hack | 9 +------- tests/gen/InterfaceA.hack | 3 +-- tests/gen/InterfaceB.hack | 4 +--- tests/gen/IntrospectionTestObject.hack | 10 +-------- tests/gen/Mutation.hack | 4 +--- tests/gen/NestedOutputShape.hack | 3 +-- tests/gen/ObjectShape.hack | 5 +---- tests/gen/OutputShape.hack | 5 +---- tests/gen/OutputTypeTestObj.hack | 10 +-------- tests/gen/PageInfo.hack | 6 +---- tests/gen/Query.hack | 22 +------------------ tests/gen/StringTypeEdge.hack | 4 +--- tests/gen/Team.hack | 6 +---- tests/gen/User.hack | 6 +---- tests/gen/UserConnection.hack | 4 +--- tests/gen/UserEdge.hack | 4 +--- tests/gen/__Directive.hack | 6 +---- tests/gen/__EnumValue.hack | 6 +---- tests/gen/__Field.hack | 8 +------ tests/gen/__InputValue.hack | 6 +---- tests/gen/__Schema.hack | 7 +----- tests/gen/__Type.hack | 11 +--------- 30 files changed, 33 insertions(+), 172 deletions(-) diff --git a/src/Codegen/Builders/Fields/FieldBuilder.hack b/src/Codegen/Builders/Fields/FieldBuilder.hack index def935d..2c907df 100644 --- a/src/Codegen/Builders/Fields/FieldBuilder.hack +++ b/src/Codegen/Builders/Fields/FieldBuilder.hack @@ -15,7 +15,6 @@ abstract class FieldBuilder { 'name' => string, 'output_type' => shape('type' => string, ?'needs_await' => bool), ?'description' => string, - ?'is_deprecated' => bool, ?'deprecation_reason' => string, ?'method_name' => string, ?'parameters' => vec, @@ -40,7 +39,6 @@ abstract class FieldBuilder { \ReflectionMethod $rm, bool $is_root_field = false, ): FieldBuilder { - $deprecated = $rm->getAttribute('__Deprecated'); $data = shape( 'name' => $field->getName(), 'description' => $field->getDescription(), @@ -63,9 +61,9 @@ abstract class FieldBuilder { return $data; }, ), - 'is_deprecated' => !!$deprecated, ); + $deprecated = $rm->getAttribute('__Deprecated'); if ($deprecated) { $data['deprecation_reason'] = C\firstx($deprecated) as string; } @@ -149,17 +147,9 @@ abstract class FieldBuilder { $hb->addLine('null,'); } - // Deprecation info - if ($this->data['is_deprecated'] ?? false) { - $hb->addLine('true,'); - $deprecation_reason = Shapes::idx($this->data, 'deprecation_reason'); - } else { - $hb->addLine('false,'); - $deprecation_reason = null; - } - - if ($deprecation_reason is nonnull) { - $hb->addLine(\var_export($deprecation_reason, true).','); + // Deprecation reason + if (Shapes::keyExists($this->data, 'deprecation_reason')) { + $hb->addLine(\var_export($this->data['deprecation_reason'], true).','); } else { $hb->addLine('null,'); } diff --git a/src/Codegen/Builders/Fields/MethodFieldBuilder.hack b/src/Codegen/Builders/Fields/MethodFieldBuilder.hack index 17ae234..b844d62 100644 --- a/src/Codegen/Builders/Fields/MethodFieldBuilder.hack +++ b/src/Codegen/Builders/Fields/MethodFieldBuilder.hack @@ -30,7 +30,7 @@ type Parameter = shape( class MethodFieldBuilder extends FieldBuilder { <<__Override>> protected function generateResolverBody(HackBuilder $hb): void { - if ($this->data['is_deprecated'] ?? false) { + if ($this->data['deprecation_reason'] ?? null) { $hb->add('/* HH_FIXME[4128] Deprecated */ '); } $type_info = $this->data['output_type']; diff --git a/src/FieldDefinition.hack b/src/FieldDefinition.hack index a8b9f78..d9cc26e 100644 --- a/src/FieldDefinition.hack +++ b/src/FieldDefinition.hack @@ -30,7 +30,6 @@ final class FieldDefinition implements IResolvableFiel Variables, ): Awaitable) $resolver, private ?string $description, - private bool $is_deprecated = false, private ?string $deprecation_reason = null, ) {} @@ -74,7 +73,7 @@ final class FieldDefinition implements IResolvableFiel } public function isDeprecated(): bool { - return $this->is_deprecated; + return $this->getDeprecationReason() is nonnull; } public function getDescription(): ?string { diff --git a/tests/gen/AlphabetConnection.hack b/tests/gen/AlphabetConnection.hack index eca1e18..a289b0c 100644 --- a/tests/gen/AlphabetConnection.hack +++ b/tests/gen/AlphabetConnection.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<<2370253297836f5871fa800f9ed67ad6>> + * @generated SignedSource<<28a23bb2fbfd1ea78d4867cfa9f92f20>> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -33,7 +33,6 @@ final class AlphabetConnection extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> await $parent->getEdges(), null, - false, null, ); case 'pageInfo': @@ -43,7 +42,6 @@ final class AlphabetConnection extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> await $parent->getPageInfo(), null, - false, null, ); default: diff --git a/tests/gen/AnotherObjectShape.hack b/tests/gen/AnotherObjectShape.hack index fb050b0..52f127f 100644 --- a/tests/gen/AnotherObjectShape.hack +++ b/tests/gen/AnotherObjectShape.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<<25f33679953f3c7f20136a2eebb74fd0>> + * @generated SignedSource<<1563ad2b8703b4a0a402edf70519ea18>> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -32,7 +32,6 @@ final class AnotherObjectShape extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent['abc'], null, - false, null, ); default: diff --git a/tests/gen/Bot.hack b/tests/gen/Bot.hack index eea00db..b747b1f 100644 --- a/tests/gen/Bot.hack +++ b/tests/gen/Bot.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<> + * @generated SignedSource<> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -37,7 +37,6 @@ final class Bot extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->getId(), 'ID of the user', - false, null, ); case 'is_active': @@ -47,7 +46,6 @@ final class Bot extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->isActive(), 'Whether the user is active', - false, null, ); case 'name': @@ -57,7 +55,6 @@ final class Bot extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->getName(), 'Name of the user', - false, null, ); case 'primary_function': @@ -67,7 +64,6 @@ final class Bot extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->getPrimaryFunction(), 'Intended use of the bot', - false, null, ); case 'team': @@ -77,7 +73,6 @@ final class Bot extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> await $parent->getTeam(), 'Team the user belongs to', - false, null, ); default: diff --git a/tests/gen/Concrete.hack b/tests/gen/Concrete.hack index 7913ea9..0d0454b 100644 --- a/tests/gen/Concrete.hack +++ b/tests/gen/Concrete.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<<577219d285f266d0284809956c7984c1>> + * @generated SignedSource<> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -36,7 +36,6 @@ final class Concrete extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->bar(), 'bar', - false, null, ); case 'baz': @@ -46,7 +45,6 @@ final class Concrete extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->baz(), 'baz', - false, null, ); case 'foo': @@ -56,7 +54,6 @@ final class Concrete extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->foo(), 'foo', - false, null, ); default: diff --git a/tests/gen/ErrorTestObj.hack b/tests/gen/ErrorTestObj.hack index 36761f7..e7ee1df 100644 --- a/tests/gen/ErrorTestObj.hack +++ b/tests/gen/ErrorTestObj.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<<1d4cf620c9b7b67489f9a5c895199816>> + * @generated SignedSource<<0a268b891ecb99ff27ff68d02d8ed3f9>> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -43,7 +43,6 @@ final class ErrorTestObj extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->bad_int_list_n_of_n(), null, - false, null, ); case 'bad_int_list_n_of_nn': @@ -53,7 +52,6 @@ final class ErrorTestObj extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->bad_int_list_n_of_nn(), 'Nullability of nested types is respected, which may result in killing the whole list (but no parents)', - false, null, ); case 'bad_int_list_nn_of_nn': @@ -63,7 +61,6 @@ final class ErrorTestObj extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->bad_int_list_nn_of_nn(), null, - false, null, ); case 'hidden_exception': @@ -73,7 +70,6 @@ final class ErrorTestObj extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->hidden_exception(), 'Arbitrary exceptions are hidden from clients, since they might contain sensitive data', - false, null, ); case 'nested': @@ -83,7 +79,6 @@ final class ErrorTestObj extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->nested(), null, - false, null, ); case 'nested_list_n_of_n': @@ -93,7 +88,6 @@ final class ErrorTestObj extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->nested_list_n_of_n(), null, - false, null, ); case 'nested_list_n_of_nn': @@ -103,7 +97,6 @@ final class ErrorTestObj extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->nested_list_n_of_nn(), null, - false, null, ); case 'nested_list_nn_of_nn': @@ -113,7 +106,6 @@ final class ErrorTestObj extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->nested_list_nn_of_nn(), null, - false, null, ); case 'nested_nn': @@ -123,7 +115,6 @@ final class ErrorTestObj extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->nested_nn(), null, - false, null, ); case 'no_error': @@ -133,7 +124,6 @@ final class ErrorTestObj extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->no_error(), null, - false, null, ); case 'non_nullable': @@ -143,7 +133,6 @@ final class ErrorTestObj extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->non_nullable(), null, - false, null, ); case 'user_facing_error': @@ -153,7 +142,6 @@ final class ErrorTestObj extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->user_facing_error(), null, - false, null, ); default: diff --git a/tests/gen/Human.hack b/tests/gen/Human.hack index 3e6516e..b62e363 100644 --- a/tests/gen/Human.hack +++ b/tests/gen/Human.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<<2d348637f5fb4c7d4c3197161f277750>> + * @generated SignedSource<<6dcb233c0846538dfa0a620a12aee762>> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -39,7 +39,6 @@ final class Human extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->getFavoriteColor(), 'Favorite color of the user', - false, null, ); case 'friends': @@ -75,7 +74,6 @@ final class Human extends \Slack\GraphQL\Types\ObjectType { Types\IntType::nullableInput()->coerceOptionalNamedNode('last', $args, $vars, null), ), 'Friends', - false, null, ); case 'id': @@ -85,7 +83,6 @@ final class Human extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->getId(), 'ID of the user', - false, null, ); case 'is_active': @@ -95,7 +92,6 @@ final class Human extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->isActive(), 'Whether the user is active', - false, null, ); case 'name': @@ -105,7 +101,6 @@ final class Human extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->getName(), 'Name of the user', - false, null, ); case 'named_friends': @@ -147,7 +142,6 @@ final class Human extends \Slack\GraphQL\Types\ObjectType { Types\IntType::nullableInput()->coerceOptionalNamedNode('last', $args, $vars, null), ), 'Test that we can pass args to a field which returns a connection', - false, null, ); case 'team': @@ -157,7 +151,6 @@ final class Human extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> await $parent->getTeam(), 'Team the user belongs to', - false, null, ); default: diff --git a/tests/gen/InterfaceA.hack b/tests/gen/InterfaceA.hack index 4a7f472..9f57606 100644 --- a/tests/gen/InterfaceA.hack +++ b/tests/gen/InterfaceA.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<<6756acff30bedd1490b4d6978405f41b>> + * @generated SignedSource<> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -33,7 +33,6 @@ final class InterfaceA extends \Slack\GraphQL\Types\InterfaceType { dict[], async ($parent, $args, $vars) ==> $parent->foo(), 'foo', - false, null, ); default: diff --git a/tests/gen/InterfaceB.hack b/tests/gen/InterfaceB.hack index 8c86c7a..30a2738 100644 --- a/tests/gen/InterfaceB.hack +++ b/tests/gen/InterfaceB.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<<1f788ce977e0e0bfec24cddd157447ee>> + * @generated SignedSource<<0ae35d65b1e919260db248fbaaab5018>> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -34,7 +34,6 @@ final class InterfaceB extends \Slack\GraphQL\Types\InterfaceType { dict[], async ($parent, $args, $vars) ==> $parent->bar(), 'bar', - false, null, ); case 'foo': @@ -44,7 +43,6 @@ final class InterfaceB extends \Slack\GraphQL\Types\InterfaceType { dict[], async ($parent, $args, $vars) ==> $parent->foo(), 'foo', - false, null, ); default: diff --git a/tests/gen/IntrospectionTestObject.hack b/tests/gen/IntrospectionTestObject.hack index a8ac9a9..d0127e9 100644 --- a/tests/gen/IntrospectionTestObject.hack +++ b/tests/gen/IntrospectionTestObject.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<<45b21ac4d00e32c0f7a4fbbccca123d1>> + * @generated SignedSource<<93ec72ecc482e1cdffed6c2cee788a99>> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -39,7 +39,6 @@ final class IntrospectionTestObject extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->getDefaultListOfNonNullableInt(), 'Default list of non nullable int', - false, null, ); case 'default_list_of_nullable_int': @@ -49,7 +48,6 @@ final class IntrospectionTestObject extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->getDefaultListOfNullableInt(), 'Default list of nullable int', - false, null, ); case 'default_nullable_string': @@ -59,7 +57,6 @@ final class IntrospectionTestObject extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->getDefaultNullableString(), 'Default nullable string', - false, null, ); case 'deprecated_field': @@ -69,7 +66,6 @@ final class IntrospectionTestObject extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> /* HH_FIXME[4128] Deprecated */ $parent->getDeprecated(), 'Deprecated field', - true, 'Deprecated for testing', ); case 'non_null_int': @@ -79,7 +75,6 @@ final class IntrospectionTestObject extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->getNonNullInt(), 'Non nullable int', - false, null, ); case 'non_null_list_of_non_null': @@ -89,7 +84,6 @@ final class IntrospectionTestObject extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->getNonNullListOfNonNull(), 'Non nullable list of non nullables', - false, null, ); case 'non_null_string': @@ -99,7 +93,6 @@ final class IntrospectionTestObject extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->getNonNullString(), 'Non nullable string', - false, null, ); case 'nullable_string': @@ -109,7 +102,6 @@ final class IntrospectionTestObject extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->getNullableString(), 'Nullable string', - false, null, ); default: diff --git a/tests/gen/Mutation.hack b/tests/gen/Mutation.hack index db4a9de..fbe9b47 100644 --- a/tests/gen/Mutation.hack +++ b/tests/gen/Mutation.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<<540c6978daeb3114ca2cdd32f05c0b40>> + * @generated SignedSource<> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -40,7 +40,6 @@ final class Mutation extends \Slack\GraphQL\Types\ObjectType { CreateUserInput::nonNullable()->coerceNamedNode('input', $args, $vars), ), 'Create a new user', - false, null, ); case 'pokeUser': @@ -57,7 +56,6 @@ final class Mutation extends \Slack\GraphQL\Types\ObjectType { Types\IntType::nonNullable()->coerceNamedNode('id', $args, $vars), ), 'Poke a user by ID', - false, null, ); default: diff --git a/tests/gen/NestedOutputShape.hack b/tests/gen/NestedOutputShape.hack index 3ffdfec..63f173f 100644 --- a/tests/gen/NestedOutputShape.hack +++ b/tests/gen/NestedOutputShape.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<<60378da7864209b678dac669afa300e5>> + * @generated SignedSource<> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -32,7 +32,6 @@ final class NestedOutputShape extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent['vec_of_string'], null, - false, null, ); default: diff --git a/tests/gen/ObjectShape.hack b/tests/gen/ObjectShape.hack index a42e6db..b1ee2ed 100644 --- a/tests/gen/ObjectShape.hack +++ b/tests/gen/ObjectShape.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<<2487726e184cab0d444933d8ad6374d9>> + * @generated SignedSource<<027a6e395bf5daeaf63e42a377209c62>> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -34,7 +34,6 @@ final class ObjectShape extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent['foo'], null, - false, null, ); case 'bar': @@ -44,7 +43,6 @@ final class ObjectShape extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent['bar'] ?? null, null, - false, null, ); case 'baz': @@ -54,7 +52,6 @@ final class ObjectShape extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent['baz'], null, - false, null, ); default: diff --git a/tests/gen/OutputShape.hack b/tests/gen/OutputShape.hack index d66888b..c202587 100644 --- a/tests/gen/OutputShape.hack +++ b/tests/gen/OutputShape.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<<770a964ed4e4c9d2deeec1bf37577248>> + * @generated SignedSource<<29784fefb527a1c0923f4913df884416>> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -34,7 +34,6 @@ final class OutputShape extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent['string'], null, - false, null, ); case 'vec_of_int': @@ -44,7 +43,6 @@ final class OutputShape extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent['vec_of_int'], null, - false, null, ); case 'nested_shape': @@ -54,7 +52,6 @@ final class OutputShape extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent['nested_shape'], null, - false, null, ); default: diff --git a/tests/gen/OutputTypeTestObj.hack b/tests/gen/OutputTypeTestObj.hack index 1930fdd..c80183f 100644 --- a/tests/gen/OutputTypeTestObj.hack +++ b/tests/gen/OutputTypeTestObj.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<<0d8ff776164898a181cc11215e760e78>> + * @generated SignedSource<<7c66631690dca9d26e83298fd9af017a>> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -39,7 +39,6 @@ final class OutputTypeTestObj extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> await $parent->awaitable(), null, - false, null, ); case 'awaitable_nullable': @@ -49,7 +48,6 @@ final class OutputTypeTestObj extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> await $parent->awaitable_nullable(), null, - false, null, ); case 'awaitable_nullable_list': @@ -59,7 +57,6 @@ final class OutputTypeTestObj extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> await $parent->awaitable_nullable_list(), null, - false, null, ); case 'list': @@ -69,7 +66,6 @@ final class OutputTypeTestObj extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->list(), null, - false, null, ); case 'nested_lists': @@ -79,7 +75,6 @@ final class OutputTypeTestObj extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->nested_lists(), 'Note that nested lists can be non-nullable', - false, null, ); case 'nullable': @@ -89,7 +84,6 @@ final class OutputTypeTestObj extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->nullable(), null, - false, null, ); case 'output_shape': @@ -99,7 +93,6 @@ final class OutputTypeTestObj extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->output_shape(), null, - false, null, ); case 'scalar': @@ -109,7 +102,6 @@ final class OutputTypeTestObj extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->scalar(), 'Note that the GraphQL field will be nullable by default, despite its non-nullable Hack type', - false, null, ); default: diff --git a/tests/gen/PageInfo.hack b/tests/gen/PageInfo.hack index 7bd3d2b..e9788d7 100644 --- a/tests/gen/PageInfo.hack +++ b/tests/gen/PageInfo.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<> + * @generated SignedSource<<77dade56f824ad0618c83d99f2e67c83>> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -35,7 +35,6 @@ final class PageInfo extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent['startCursor'] ?? null, null, - false, null, ); case 'endCursor': @@ -45,7 +44,6 @@ final class PageInfo extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent['endCursor'] ?? null, null, - false, null, ); case 'hasPreviousPage': @@ -55,7 +53,6 @@ final class PageInfo extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent['hasPreviousPage'] ?? null, null, - false, null, ); case 'hasNextPage': @@ -65,7 +62,6 @@ final class PageInfo extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent['hasNextPage'] ?? null, null, - false, null, ); default: diff --git a/tests/gen/Query.hack b/tests/gen/Query.hack index 0cf9839..ff72a69 100644 --- a/tests/gen/Query.hack +++ b/tests/gen/Query.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<<067275aa67c4d0b5123b0d4bec136ff8>> + * @generated SignedSource<<22d2455b45e30b3d6e20f3dc010d7761>> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -49,7 +49,6 @@ final class Query extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> new Schema(), null, - false, null, ); case '__type': @@ -67,7 +66,6 @@ final class Query extends \Slack\GraphQL\Types\ObjectType { Types\StringType::nonNullable()->coerceNamedNode('name', $args, $vars), ), null, - false, null, ); case 'alphabetConnection': @@ -103,7 +101,6 @@ final class Query extends \Slack\GraphQL\Types\ObjectType { Types\IntType::nullableInput()->coerceOptionalNamedNode('last', $args, $vars, null), ), 'Test for list connection', - false, null, ); case 'arg_test': @@ -131,7 +128,6 @@ final class Query extends \Slack\GraphQL\Types\ObjectType { Types\IntType::nullableInput()->coerceOptionalNamedNode('optional', $args, $vars, 42), ), 'Root field for testing arguments', - false, null, ); case 'bot': @@ -148,7 +144,6 @@ final class Query extends \Slack\GraphQL\Types\ObjectType { Types\IntType::nonNullable()->coerceNamedNode('id', $args, $vars), ), 'Fetch a bot by ID', - false, null, ); case 'error_test': @@ -158,7 +153,6 @@ final class Query extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> \ErrorTestObj::get(), 'Root field to get an instance', - false, null, ); case 'error_test_nn': @@ -168,7 +162,6 @@ final class Query extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> \ErrorTestObj::getNonNullable(), 'A non-nullable root field to get an instance', - false, null, ); case 'getConcrete': @@ -178,7 +171,6 @@ final class Query extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> \Concrete::getConcrete(), 'Root field to get an instance of Concrete', - false, null, ); case 'getInterfaceA': @@ -188,7 +180,6 @@ final class Query extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> \Concrete::getInterfaceA(), 'Root field to get an instance of InterfaceA', - false, null, ); case 'getInterfaceB': @@ -198,7 +189,6 @@ final class Query extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> \Concrete::getInterfaceB(), 'Root field to get an instance of InterfaceB', - false, null, ); case 'getObjectShape': @@ -208,7 +198,6 @@ final class Query extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> \ObjectTypeTestEntrypoint::getObjectShape(), 'fetch an object shape', - false, null, ); case 'human': @@ -225,7 +214,6 @@ final class Query extends \Slack\GraphQL\Types\ObjectType { Types\IntType::nonNullable()->coerceNamedNode('id', $args, $vars), ), 'Fetch a user by ID', - false, null, ); case 'introspection_test': @@ -235,7 +223,6 @@ final class Query extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> \IntrospectionTestObject::get(), 'Root field to get an instance', - false, null, ); case 'list_arg_test': @@ -252,7 +239,6 @@ final class Query extends \Slack\GraphQL\Types\ObjectType { Types\IntType::nonNullable()->nullableInputListOf()->nonNullableInputListOf()->nullableInputListOf()->coerceNamedNode('arg', $args, $vars), ), 'Root field for testing list arguments', - false, null, ); case 'nested_list_sum': @@ -269,7 +255,6 @@ final class Query extends \Slack\GraphQL\Types\ObjectType { Types\IntType::nonNullable()->nonNullableInputListOf()->nonNullableInputListOf()->coerceNamedNode('numbers', $args, $vars), ), 'Test for nested list arguments', - false, null, ); case 'optional_field_test': @@ -286,7 +271,6 @@ final class Query extends \Slack\GraphQL\Types\ObjectType { CreateUserInput::nonNullable()->coerceNamedNode('input', $args, $vars), ), 'Test for an optional input object field', - false, null, ); case 'output_type_test': @@ -296,7 +280,6 @@ final class Query extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> \OutputTypeTestObj::get(), 'Root field to get an instance', - false, null, ); case 'takes_favorite_color': @@ -313,7 +296,6 @@ final class Query extends \Slack\GraphQL\Types\ObjectType { FavoriteColor::nonNullable()->coerceNamedNode('favorite_color', $args, $vars), ), 'Test for enum arguments', - false, null, ); case 'user': @@ -330,7 +312,6 @@ final class Query extends \Slack\GraphQL\Types\ObjectType { Types\IntType::nonNullable()->coerceNamedNode('id', $args, $vars), ), 'Fetch a user by ID', - false, null, ); case 'viewer': @@ -340,7 +321,6 @@ final class Query extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> await \UserQueryAttributes::getViewer(), 'Authenticated viewer', - false, null, ); default: diff --git a/tests/gen/StringTypeEdge.hack b/tests/gen/StringTypeEdge.hack index 76b0c7b..e239d95 100644 --- a/tests/gen/StringTypeEdge.hack +++ b/tests/gen/StringTypeEdge.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<<35211b3a6d5dfa2888824c500024d226>> + * @generated SignedSource<> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -33,7 +33,6 @@ final class StringTypeEdge extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->getNode(), null, - false, null, ); case 'cursor': @@ -43,7 +42,6 @@ final class StringTypeEdge extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->getCursor(), null, - false, null, ); default: diff --git a/tests/gen/Team.hack b/tests/gen/Team.hack index d777873..e219522 100644 --- a/tests/gen/Team.hack +++ b/tests/gen/Team.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<<4f9d8cbae367577036392dff97a6275d>> + * @generated SignedSource<<4101af3b5a52deed789cbd661b9a8b0d>> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -42,7 +42,6 @@ final class Team extends \Slack\GraphQL\Types\ObjectType { Types\BooleanType::nonNullable()->coerceNamedNode('short', $args, $vars), ), 'Description of the team', - false, null, ); case 'id': @@ -52,7 +51,6 @@ final class Team extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->getId(), 'ID of the team', - false, null, ); case 'name': @@ -62,7 +60,6 @@ final class Team extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->getName(), 'Name of the team', - false, null, ); case 'num_users': @@ -72,7 +69,6 @@ final class Team extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> await $parent->getNumUsers(), 'Number of users on the team', - false, null, ); default: diff --git a/tests/gen/User.hack b/tests/gen/User.hack index a1d7946..2d21adb 100644 --- a/tests/gen/User.hack +++ b/tests/gen/User.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<<9cba384158f3aba76251dad8ebed7202>> + * @generated SignedSource<<3f80380271d776f8efd8825d50e067d7>> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -37,7 +37,6 @@ final class User extends \Slack\GraphQL\Types\InterfaceType { dict[], async ($parent, $args, $vars) ==> $parent->getId(), 'ID of the user', - false, null, ); case 'is_active': @@ -47,7 +46,6 @@ final class User extends \Slack\GraphQL\Types\InterfaceType { dict[], async ($parent, $args, $vars) ==> $parent->isActive(), 'Whether the user is active', - false, null, ); case 'name': @@ -57,7 +55,6 @@ final class User extends \Slack\GraphQL\Types\InterfaceType { dict[], async ($parent, $args, $vars) ==> $parent->getName(), 'Name of the user', - false, null, ); case 'team': @@ -67,7 +64,6 @@ final class User extends \Slack\GraphQL\Types\InterfaceType { dict[], async ($parent, $args, $vars) ==> await $parent->getTeam(), 'Team the user belongs to', - false, null, ); default: diff --git a/tests/gen/UserConnection.hack b/tests/gen/UserConnection.hack index b196fcc..93c94c4 100644 --- a/tests/gen/UserConnection.hack +++ b/tests/gen/UserConnection.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<> + * @generated SignedSource<<54bd192726634acf19f8a1b2080e2b3b>> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -33,7 +33,6 @@ final class UserConnection extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> await $parent->getEdges(), null, - false, null, ); case 'pageInfo': @@ -43,7 +42,6 @@ final class UserConnection extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> await $parent->getPageInfo(), null, - false, null, ); default: diff --git a/tests/gen/UserEdge.hack b/tests/gen/UserEdge.hack index 131f19c..689f26c 100644 --- a/tests/gen/UserEdge.hack +++ b/tests/gen/UserEdge.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<<6735de87aced1c81ab2e5da96041da0d>> + * @generated SignedSource<<9925c3d082ffd4d43aa08bc530735963>> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -33,7 +33,6 @@ final class UserEdge extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->getNode(), null, - false, null, ); case 'cursor': @@ -43,7 +42,6 @@ final class UserEdge extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->getCursor(), null, - false, null, ); default: diff --git a/tests/gen/__Directive.hack b/tests/gen/__Directive.hack index d4ac4c4..7f4713a 100644 --- a/tests/gen/__Directive.hack +++ b/tests/gen/__Directive.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<<5dbdcd141b9db786ce8b63cb9cddd3f4>> + * @generated SignedSource<<796f38c47585b4bd8216598885e63d20>> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -35,7 +35,6 @@ final class __Directive extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent['name'], null, - false, null, ); case 'description': @@ -45,7 +44,6 @@ final class __Directive extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent['description'], null, - false, null, ); case 'locations': @@ -55,7 +53,6 @@ final class __Directive extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent['locations'], null, - false, null, ); case 'args': @@ -65,7 +62,6 @@ final class __Directive extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent['args'], null, - false, null, ); default: diff --git a/tests/gen/__EnumValue.hack b/tests/gen/__EnumValue.hack index 3404b89..1fd8101 100644 --- a/tests/gen/__EnumValue.hack +++ b/tests/gen/__EnumValue.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<<24a17dee77b7b44ce4810934086df012>> + * @generated SignedSource<<79cc4c1ea40dd63c7dfe85f7089e9fb2>> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -35,7 +35,6 @@ final class __EnumValue extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent['name'], null, - false, null, ); case 'isDeprecated': @@ -45,7 +44,6 @@ final class __EnumValue extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent['isDeprecated'], null, - false, null, ); case 'description': @@ -55,7 +53,6 @@ final class __EnumValue extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent['description'] ?? null, null, - false, null, ); case 'deprecationReason': @@ -65,7 +62,6 @@ final class __EnumValue extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent['deprecationReason'] ?? null, null, - false, null, ); default: diff --git a/tests/gen/__Field.hack b/tests/gen/__Field.hack index 046a713..1a46e46 100644 --- a/tests/gen/__Field.hack +++ b/tests/gen/__Field.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<<7a4c88e2f4532732ddad9264db61c821>> + * @generated SignedSource<<10c691da2cbe51607ac826b0daa0aa1e>> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -37,7 +37,6 @@ final class __Field extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->getArgs(), 'Args of the field', - false, null, ); case 'deprecationReason': @@ -47,7 +46,6 @@ final class __Field extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->getDeprecationReason(), 'Reason the field was deprecated', - false, null, ); case 'description': @@ -57,7 +55,6 @@ final class __Field extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->getDescription(), 'Description of the field', - false, null, ); case 'isDeprecated': @@ -67,7 +64,6 @@ final class __Field extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->isDeprecated(), 'Boolean for whether or not the field is deprecated', - false, null, ); case 'name': @@ -77,7 +73,6 @@ final class __Field extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->getName(), 'Name of the field', - false, null, ); case 'type': @@ -87,7 +82,6 @@ final class __Field extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->getType(), 'Type of the field', - false, null, ); default: diff --git a/tests/gen/__InputValue.hack b/tests/gen/__InputValue.hack index 4b1c209..89ef46c 100644 --- a/tests/gen/__InputValue.hack +++ b/tests/gen/__InputValue.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<<5fbbae6803b3528b0eb9b8f4f09a0d2e>> + * @generated SignedSource<> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -35,7 +35,6 @@ final class __InputValue extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent['name'], null, - false, null, ); case 'description': @@ -45,7 +44,6 @@ final class __InputValue extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent['description'] ?? null, null, - false, null, ); case 'type': @@ -55,7 +53,6 @@ final class __InputValue extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent['type'], null, - false, null, ); case 'defaultValue': @@ -65,7 +62,6 @@ final class __InputValue extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent['defaultValue'] ?? null, null, - false, null, ); default: diff --git a/tests/gen/__Schema.hack b/tests/gen/__Schema.hack index bff774e..9c8073e 100644 --- a/tests/gen/__Schema.hack +++ b/tests/gen/__Schema.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<> + * @generated SignedSource<> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -36,7 +36,6 @@ final class __Schema extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->getDirectives(), 'Directives supported by the schema', - false, null, ); case 'mutationType': @@ -46,7 +45,6 @@ final class __Schema extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->getIntrospectionMutationType(), 'Mutation root type', - false, null, ); case 'queryType': @@ -56,7 +54,6 @@ final class __Schema extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->getIntrospectionQueryType(), 'Query root type', - false, null, ); case 'subscriptionType': @@ -66,7 +63,6 @@ final class __Schema extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->getIntrospectionSubscriptionType(), 'Subscription root type', - false, null, ); case 'types': @@ -76,7 +72,6 @@ final class __Schema extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->getTypes(), 'Types contained within the schema', - false, null, ); default: diff --git a/tests/gen/__Type.hack b/tests/gen/__Type.hack index a3b776e..fb5c756 100644 --- a/tests/gen/__Type.hack +++ b/tests/gen/__Type.hack @@ -4,7 +4,7 @@ * To re-generate this file run vendor/bin/hacktest * * - * @generated SignedSource<<48a05c7de06f421d045fa09aaa1da78e>> + * @generated SignedSource<<7cbd90ef4f45cdf1581e52cb4bde2388>> */ namespace Slack\GraphQL\Test\Generated; use namespace Slack\GraphQL; @@ -40,7 +40,6 @@ final class __Type extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->getIntrospectionDescription(), 'Description of the type', - false, null, ); case 'enumValues': @@ -58,7 +57,6 @@ final class __Type extends \Slack\GraphQL\Types\ObjectType { Types\BooleanType::nonNullable()->coerceOptionalNamedNode('includeDeprecated', $args, $vars, false), ), 'Enum values, only applies to ENUM', - false, null, ); case 'fields': @@ -76,7 +74,6 @@ final class __Type extends \Slack\GraphQL\Types\ObjectType { Types\BooleanType::nonNullable()->coerceOptionalNamedNode('includeDeprecated', $args, $vars, false), ), 'Fields of the type, only applies to OBJECT and INTERFACE', - false, null, ); case 'inputFields': @@ -86,7 +83,6 @@ final class __Type extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->getIntrospectionInputFields(), 'Input fields, only applies to INPUT_OBJECT', - false, null, ); case 'interfaces': @@ -96,7 +92,6 @@ final class __Type extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->getIntrospectionInterfaces(), 'Interfaces the object implements, only applies to OBJECT', - false, null, ); case 'kind': @@ -106,7 +101,6 @@ final class __Type extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->getIntrospectionKind(), 'Kind of the type', - false, null, ); case 'name': @@ -116,7 +110,6 @@ final class __Type extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->getIntrospectionName(), 'Name of the type', - false, null, ); case 'ofType': @@ -126,7 +119,6 @@ final class __Type extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->getIntrospectionOfType(), 'Underlying wrapped type, only applies to NON_NULL and LIST', - false, null, ); case 'possibleTypes': @@ -136,7 +128,6 @@ final class __Type extends \Slack\GraphQL\Types\ObjectType { dict[], async ($parent, $args, $vars) ==> $parent->getIntrospectionPossibleTypes(), 'Possible types that implement this interface, only applies to INTERFACE', - false, null, ); default: