-
-
Notifications
You must be signed in to change notification settings - Fork 141
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
Add a scalar JSON to graphql and use it for the authenticate params type #798
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good.
Needs some documentation about what the json input needs look like for existing authentication types since the AuthenticateParamsInput
is removed.
what do you think about using JSON from GraphQL Scalars? |
@Urigo I saw that you were using graphql-type-json for graphql-scalars, since it's the only custom scalar we are using, I was thinking to just use it directly :) |
@pradel I kinda solved it (prune to overrides) in https://github.com/ozsay/accounts/tree/graphql-api-2. after the change, if I wanted to add a new service (tested for the code-service in PR), I could add it to its
The module mechanism would merge Since I'm using the same mechanism as before, I guess it works the same without my changes to |
@ozsay I see, I like the idea, my only concern is that every time you add a service you will have to change the graphql schema meaning more configuration to do for the users. |
Since we can actually extend the input in graphql 14.X maybe it's better to not use JSON |
Extend is the way to go 🚀 |
Related to #796, @ozsay you might want to take a look.
Using a JSON scalar for the params argument will allow us to write more services without having to change the graphql schema to support that specific service