Skip to content
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

Support custom Scalar URLS #2386

Open
acao opened this issue May 4, 2022 · 1 comment
Open

Support custom Scalar URLS #2386

acao opened this issue May 4, 2022 · 1 comment

Comments

@acao
Copy link
Member

acao commented May 4, 2022

In terms of using custom scalars by URL, we have support now for specifiedBy directive!

Now users can host common scalar definitions, etc.

Any tickets you see that ask about using some custom, non-spec scalar type, whether closed or open tickets, should all be directed to this ticket.

Here is the spec:
http://spec.graphql.org/draft/#sec-Scalars.Custom-Scalars

so this works as long we use specifiedBy (SDL) or specifiedByURL in the introspection query (how should we expose adding this field in graphiql? or add it every time? is it there already).

If this is in the schema, then the inline variable validation should work automatically based on our usage of graphql validate(). However, in both codemirror-monaco and monaco-graphql we have more specific logic for validation of variable scalar values that will need to be tweaked for both plugins.

@acao
Copy link
Member Author

acao commented May 4, 2022

We could support these custom scalars that match up with different specs!

https://www.graphql-scalars.dev/docs/scalars/json-object

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant