GraphQLBundle icon indicating copy to clipboard operation
GraphQLBundle copied to clipboard

PHP attribute field definition for not null?

Open jsakars opened this issue 1 year ago • 0 comments

Q A
Bug report? no
Feature request? yes
BC Break report? no
RFC? yes/no
Version/Branch 1.0.0

Hi!

#[GQL\Field(type: Type::STRING)] can be used to specify that given input field is a string - nullable

In order to define not null string the only option is: #[GQL\Field(type: 'String!')]

Is there a smoother option rather then using string 'String!? Something like #[GQL\Field(type: Type::STRING!)] maybe?

References https://github.com/webonyx/graphql-php/issues/1462

jsakars avatar Oct 06 '23 12:10 jsakars