mercurius-js / validation

Adds configurable validation support to Mercurius.
MIT License
29 stars 6 forks source link

Add basic validation implementation #2

Closed jonnydgreen closed 2 years ago

jonnydgreen commented 3 years ago

Closes: https://github.com/mercurius-js/validation/issues/1

Draft PR that adds a basic implementation. At the moment, I have just focussed on proving the concept for external policies:

This has the following caveats (which I think are okay for v1?):

Let me know what you think about the above caveats and what I've done so far. The quality of the code isn't great atm as there are a lot of things to polish up, but the core ideas are there if you'd like to take an early look :)

Still to do:

Open Questions:

jonnydgreen commented 3 years ago

Made some more progress - next steps are to tidy things up a bit, add extra testing and then move onto:

Is there any functionality not covered by the tests that you'd like in v1?

jonnydgreen commented 3 years ago

Almost there with the documentation. I'll push that up with the examples tonight and then crack on with the typings :)

mcollina commented 3 years ago

Amazing work!

jonnydgreen commented 3 years ago

Thanks! It's been very fun to code :)

jonnydgreen commented 2 years ago

Finalising the rest of the docs after a couple of changes - once that's done this afternoon I'll bring it out of draft :)