UNPKG

graphql-yoga

Version:

<div align="center"><img src="./website/public/cover.png" width="720" /></div>

17 lines (16 loc) 436 B
export function useHTTPValidationError() { return { onValidate() { return ({ valid, result }) => { if (!valid) { result.forEach((error) => { error.extensions.http = { spec: true, status: 400, }; }); } }; }, }; }