We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation is confusing
On Essential -> Schema -> Global Schema,
Its is mentioned that we can define global schema using:
.schema followed by a life cycle event in camelCase:
.schema
Its not clear.
The provided code
.schema({ query: t.Object({ name: t.String() }) }) .get('/query', ({ query: { name } }) => name)
the code is incorrect, it throws an error:
This expression is not callable.
TypeError: Object is not a function (near '...}).schema({...')
Defining a guard on top level does the job of validating the request.
.guard({ query: t.Object({ name: t.String() }), }) .get('/query', ({ query: { name } }) => name)
If this is the case, We may need to to rephrase some description and update the example. I can send PR for this
If we can use the .schema, how can we do that?
Essential -> Schema -> Global Schema
The text was updated successfully, but these errors were encountered:
It was already mentioned on #270 and #215. as mentioned by SaltyAom on #215 I will send a PR with .guard
.guard
Sorry, something went wrong.
fix by #283
No branches or pull requests
What is the type of issue?
Documentation is confusing
What is the issue?
On Essential -> Schema -> Global Schema,
Its is mentioned that we can define global schema using:
Its not clear.
The provided code
the code is incorrect, it throws an error:
This expression is not callable.
(IDE help)TypeError: Object is not a function (near '...}).schema({...')
(Runtime)Defining a guard on top level does the job of validating the request.
If this is the case, We may need to to rephrase some description and update the example. I can send PR for this
If we can use the
.schema
, how can we do that?Where did you find it?
Essential -> Schema -> Global Schema
The text was updated successfully, but these errors were encountered: