Skip to content

Commit ea371d8

Browse files
authored
add some initial thoughts about input objects and fields
1 parent 68aa4df commit ea371d8

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

rfcs/SubschemaComposability.md

+12-1
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,22 @@ The below RFC is meant to be useful across all varieties of schema composition.
5353

5454
# Enums
5555

56-
1. Overlapping enum types where the disparate types define identical sets of values can always be merged, as they are identical in all subschemas.
56+
1. Overlapping enum types where the types define identical sets of values can always be merged, as they are identical in all subschemas.
5757
2. Subschemas with overlapping enum types where the disparate types define different value sets are only sometimes composable.
5858
- When using `Single-service composite schema execution`, the enum types can be merged as a union of values from all subschemas.
5959
- When using `Subschemas as remote GraphQL services`
6060
- If the enum types are used only in output types, the enum types can be merged as a union of values from all subschemas.
6161
- If the enum types are used in input types, the enum types can be merged if and only if there is a way to translate, for any given subschema, every enum value that is defined only in the composite schema to an enum value defined for that subschema.
6262

63+
# Input Object Types
64+
65+
1. Overlapping input object types can be merged, as long as the overlapping input fields can be merged.
66+
2. If some of the types define fields not defined by the other types, the fields of these input objects may no longer affect the execution of portions of the subschema, in ways that may be unpredictable for users of the composite schema. Although clear documentation may ameliorate this issue, overall, the user experience may suffer.
67+
68+
# Input Object Fields
69+
70+
1. Overlapping input object fields can be merged as long as the fields define the same type, allowing for variations in nullability.
71+
2. If any of the field types contain non-nullable portions, the field types must be merged as non-nullable for that portion.
72+
3. TODO: discuss default values.
73+
6374
WIP! will be edited.

0 commit comments

Comments
 (0)