-
Notifications
You must be signed in to change notification settings - Fork 17
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
GraphQL scalar definition not supported #96
Comments
FYI, I also tried with alternate syntax like this:
However, the same error occurs. |
Actually, now I think it is just the use of |
Yes, custom scalars are not supported by cruddl. To implement it, we first need to decide how they can be configured by the schema author, because we can't just use callbacks for validation (cruddl never uses callbacks for modelling). We could e.g. allow to specify a regular expression to validate scalars. What do you think? |
Something like regex would be a start so we could at least support I know you don't support it, so my thought was to integrate some of those things (i.e. audit logging) as other custom directives so I could chain things together. cruddl is a great idea, but it can't be an impenetrable line between graphql and arango. Developers need to be able to inject and extract data along that pipeline. |
Hmmm... Now I'm not even sure cruddl will allow the addition of other directive handlers. |
Okay, so this is a non-starter as well. Cruddl throws up if you also reference other non-cruddl directives. By graphql standard, @Directives are supposed to be cumulative and chainable from left-to-right. There is no reason cruddl should be throwing an error if it sees a directive it doesn't understand. Is there a way to pass other directive handlers into cruddl so it knows about the use of other non-cruddl directives such as graphql-constraint-directive? I've split this off into #98. |
I didn't write cruddl does not use callbacks for configuration - it already does in several instances (just look at I meant that modelling should not require callbacks. Maybe the goals of cruddl and your requirements are not exactly overlapping here - we use cruddl in a generic component called "Model Manager" where users can dynamically define their schema via a web interface. They can't just implement a cruddl callback. However, I'm ok with callbacks and extensive configuration if it's not directly coupled to the cruddl type definitions in the
This line is the opposite of impemetrable! Actually, that's the part of cruddl that's closes to a "plugin" architecture. When creating a schema, you specify a database adapter. There, you can pass custom database adapters. For example, you can create a subclass of However, the modelling features currently don't follow a plugin architecture. In an earlier version of cruddl, we used a pipeline approach to gradually "enhance" the cruddl-input to the real, executable GraphQL schema. However, that approach got pretty messy pretty quickly, and we developed a framework that allows us to implement features in a cleaner way. |
cruddl appears to be throwing errors on Graphql documentation syntax. If my schema has something like this:
Processing through cruddl reports errors like this:
The text was updated successfully, but these errors were encountered: