apollo-server icon indicating copy to clipboard operation
apollo-server copied to clipboard

feat: add validationMaxErrors option

Open mo4islona opened this issue 11 months ago • 6 comments

Fixes #8013

mo4islona avatar Jan 08 '25 11:01 mo4islona

@mo4islona: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Apollo Contributor License Agreement here: https://contribute.apollographql.com/

apollo-cla avatar Jan 08 '25 11:01 apollo-cla

✅ Docs Preview Ready

No new or changed pages found.

svc-apollo-docs avatar Jan 08 '25 11:01 svc-apollo-docs

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

codesandbox-ci[bot] avatar Jan 08 '25 11:01 codesandbox-ci[bot]

I think it would be more extensible to add a validateOptions option similar to the existing parseOptions. It's a bit awkward that graphql-js does not export a ValidationOptions TS interface, but you could use Parameters<typeof validate>[3] or something.

glasser avatar Jan 08 '25 17:01 glasser

I think it would be more extensible to add a validateOptions option similar to the existing parseOptions. It's a bit awkward that graphql-js does not export a ValidationOptions TS interface, but you could use Parameters<typeof validate>[3] or something.

Implemented.

mo4islona avatar Jan 08 '25 20:01 mo4islona

This looks like a good improvement (very similar to #8062). It is backwards-compatible, so I'm not going to rush to get it in before releasing v5. It needs docs.

glasser avatar Jul 03 '25 23:07 glasser