Skip to content

Commit

Permalink
feat: Add support for custom scalar validation (#3376)
Browse files Browse the repository at this point in the history
* fix: VariableJSONSchema optional input types
* support custom schemas in monaco-graphql
* improve descriptions
  • Loading branch information
bboure committed Aug 9, 2023
1 parent 85edb9e commit 7b00774
Show file tree
Hide file tree
Showing 7 changed files with 453 additions and 148 deletions.
5 changes: 5 additions & 0 deletions .changeset/few-hats-move.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'graphql-language-service': patch
---

Fix Variables JSON Schema for null values
6 changes: 6 additions & 0 deletions .changeset/tame-lions-teach.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'graphql-language-service': minor
'monaco-graphql': minor
---

Add support for custom scalars
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,28 @@ schema {

directive @test(testArg: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT

scalar SomeCustomScalar
scalar EmailAddress
scalar Even
scalar SpecialScalar
scalar SpecialDate
scalar FooBar
scalar Foo

"""
An input type with custom scalars
"""
input CustomScalarsInput {
"""
example email
"""
email: EmailAddress
"""
example even
"""
even: Even
}

enum Episode {
NEWHOPE
EMPIRE
Expand Down
Loading

0 comments on commit 7b00774

Please sign in to comment.