-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
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
chore: Update @hapi/joi #25797
chore: Update @hapi/joi #25797
Conversation
Please switch the dependency to |
Are you back on the hapi version because of typescript? |
Yep, was going to shoot a message across but you beat me to it! If there's an easy way to solve this let me know! Otherwise I feel like taking a phased approach works best for me:
|
I will get the type definitions copied over to the original namespace so it will resolve this. Meanwhile your plan sounds good. |
Eran, I'm struggling to understand the translation of joi-to-graphql.js. There's a lot of Hope that's okay? |
I'm surprised how deep this code goes into joi internals... You are on the right track with I am happy to try and help but I can't figure out how to run the tests for this code. |
So a little further on... It looks like the file enumerates the keys of the current schema and switches based on whether it's an object, array or lazy. The fields returned looked like:
I got something similar using object.extract() which gave me the matching fields schema. I just don't really know how to procede with For reference I've never used Joi so this is a bit of a learning curve for me. @ascorbic |
@herecydev You should only use |
We copied-and-edited that code from https://github.com/xogroup/joi2gql, so we're not familiar with it either unfortunately 😬 |
😬 that's not ideal. I've raised a ticket upstream. |
@mxstbr not sure how to move this forward. https://github.com/xogroup/joi2gql looks very unloved. |
Note that joi v17.2.0 is published with TS support under |
I think this PR got quite stale and diverged from the current We removed |
Fixes #25764