graphql-constraint-directive icon indicating copy to clipboard operation
graphql-constraint-directive copied to clipboard

Validate GraphQL fields

Results 66 graphql-constraint-directive issues
Sort by recently updated
recently updated
newest added

Code for Issues/FR #92. Currently only PoC to show basic concept and agree on future direction. Do not expected to be merged in this state. @confuser please look at this...

When using `limit: Int @constraint(uniqueTypeName: "Int", min: 1, max: 200)`, I would expect the validation to still run. However no errors are generated. Is this expected behavior? Is this something...

enhancement

Allow to run query validations as [server validation rules](https://www.apollographql.com/docs/apollo-server/api/apollo-server/#validationrules) instead of wrapping types in schema. @confuser I can try to contribute this feature if you would be open to merge...

question

It would be nice if there was support for list constraints in particulair: `minListLength` and `maxListLength` ```graphql input Example { beep: [Int!]! @constraint(minListLength: 3) boop: [String!]! @constraint(maxListLength: 3) } ```

enhancement

I use graphql-tools to load up multiple files into one schema. Maybe i should set it up diffrently? Pls help :) ``` const loadSchema = loadSchemaSync(join(__dirname, "./graphql/*.graphql"), { loaders: [new...

Hej there! Thanks for this project. :smile::+1: I just tried to update your package from `2.1.1` to `2.3.0` and noticed that `constraintDirectiveTypeDefs` is a `string`. Shouldn't it be a gql...

Hello, I am using graphql-constraint-directive with apollo-server-express But in formatError, when I call error.originalError it always return undefined. Here my code: ``` const { constraintDirective, constraintDirectiveTypeDefs } = require('graphql-constraint-directive') const...

question

Can we think about adding support for scalars as well? This shall help speed up development and validations.

enhancement

I would like to able to assert that a field on an input is optional, but not nullable (so I can do a partial update of an entity). [GraphQL has...

question

I didn't find a way to have makeExecutableSchema work alongside Apollo-federated. Is there any way to use this library while using Apollo federation?