File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ The current version 3.0.0a2 of GraphQL-core is up-to-date
16
16
with GraphQL.js version 14.4.1.
17
17
18
18
All parts of the API are covered by an extensive test suite
19
- of currently 1906 unit tests.
19
+ of currently 1907 unit tests.
20
20
21
21
22
22
## Documentation
Original file line number Diff line number Diff line change @@ -562,6 +562,30 @@ def throws_when_referenced_unknown_type():
562
562
" in order to build a client schema."
563
563
)
564
564
565
+ def throws_when_missing_definition_for_one_of_the_standard_scalars ():
566
+ schema = build_schema (
567
+ """
568
+ type Query {
569
+ foo: Float
570
+ }
571
+ """
572
+ )
573
+ introspection = introspection_from_schema (schema )
574
+ introspection ["__schema" ]["types" ] = [
575
+ type_
576
+ for type_ in introspection ["__schema" ]["types" ]
577
+ if type_ ["name" ] != "Float"
578
+ ]
579
+
580
+ with raises (TypeError ) as exc_info :
581
+ build_client_schema (introspection )
582
+
583
+ assert str (exc_info .value ).endswith (
584
+ "Invalid or incomplete schema, unknown type: Float."
585
+ " Ensure that a full introspection query is used"
586
+ " in order to build a client schema."
587
+ )
588
+
565
589
def throws_when_type_reference_is_missing_name ():
566
590
introspection = introspection_from_schema (dummy_schema )
567
591
You can’t perform that action at this time.
0 commit comments