File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -548,24 +548,21 @@ export class GraphQLSemanticNonNull<T extends GraphQLNullableType> {
548
548
/**
549
549
* Semantic-Nullable Type Wrapper
550
550
*
551
- * A semantic-non-null is a wrapping type which points to another type.
552
- * Semantic-non-null types enforce that their values are never null unless
553
- * caused by an error being raised. It is useful for fields which you can make
554
- * a guarantee on non-nullability in a no-error case, for example when you know
555
- * that a related entity must exist (but acknowledge that retrieving it may
556
- * produce an error).
551
+ * A semantic-nullable is a wrapping type which points to another type.
552
+ * Semantic-nullable types allow their values to be null.
557
553
*
558
554
* Example:
559
555
*
560
556
* ```ts
561
557
* const RowType = new GraphQLObjectType({
562
558
* name: 'Row',
563
559
* fields: () => ({
564
- * email: { type: new GraphQLSemanticNonNull (GraphQLString) },
560
+ * email: { type: new GraphQLSemanticNullable (GraphQLString) },
565
561
* })
566
562
* })
567
563
* ```
568
- * Note: the enforcement of non-nullability occurs within the executor.
564
+ * Note: This is equivalent to the unadorned named type that is
565
+ * used by GraphQL when it is not operating in SemanticNullability mode.
569
566
*
570
567
* @experimental
571
568
*/
You can’t perform that action at this time.
0 commit comments