dimaMachina / graphql-eslint

ESLint parser, plugin, and rule set for GraphQL (for schema and operations). Easily customizable with custom rules. Integrates with IDEs and modern GraphQL tools.
https://the-guild.dev/graphql/eslint
MIT License
800 stars 104 forks source link

Adding native AWS Types #1963

Open hrferdowsi opened 1 year ago

hrferdowsi commented 1 year ago

Is your feature request related to a problem? Please describe.

graphql-eslint dosn't support AWS supported scalars and return Unknown type error. The main supported AWS scalars for AppSync are : AWSDate, AWSDateTime, AWSEmail, AWSIPAddress, AWSJSON, AWSPhone, AWSTime, AWSTimestamp, AWSURL

it currently breaking the pipelines with this error:

0:0 error Parsing error: [graphql-eslint] Error while loading schema: Unknown type "AWSJSON".

Describe the solution you'd like

add these types as accepted scalar types: AWSDate, AWSDateTime, AWSEmail, AWSIPAddress, AWSJSON, AWSPhone, AWSTime, AWSTimestamp, AWSURL

Describe alternatives you've considered

Atleast skip checking these types to stop pipelines from failing

dimaMachina commented 1 year ago

graphql-eslint dosn't support AWS supported scalars and return Unknown type error.

normal behaviour graphql-eslint takes input schema, and builds it, if some type is missing how he should know it?

Do you have any ideas on how to include them for AWS projects? include by default is not a good idea since the user can have their own scalar AWSEmail, maybe via some option in parserOptions or graphql-config?