Skip to content

Commit 7b00774

Browse files
authored
feat: Add support for custom scalar validation (#3376)
* fix: VariableJSONSchema optional input types * support custom schemas in monaco-graphql * improve descriptions
1 parent 85edb9e commit 7b00774

File tree

7 files changed

+453
-148
lines changed

7 files changed

+453
-148
lines changed

.changeset/few-hats-move.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'graphql-language-service': patch
3+
---
4+
5+
Fix Variables JSON Schema for null values

.changeset/tame-lions-teach.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'graphql-language-service': minor
3+
'monaco-graphql': minor
4+
---
5+
6+
Add support for custom scalars

packages/graphql-language-service/src/utils/__tests__/__schema__/StarWarsSchema.graphql

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,28 @@ schema {
44

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

7+
scalar SomeCustomScalar
8+
scalar EmailAddress
9+
scalar Even
10+
scalar SpecialScalar
11+
scalar SpecialDate
12+
scalar FooBar
13+
scalar Foo
14+
15+
"""
16+
An input type with custom scalars
17+
"""
18+
input CustomScalarsInput {
19+
"""
20+
example email
21+
"""
22+
email: EmailAddress
23+
"""
24+
example even
25+
"""
26+
even: Even
27+
}
28+
729
enum Episode {
830
NEWHOPE
931
EMPIRE

0 commit comments

Comments
 (0)