diff --git a/docs/type-system/interfaces.md b/docs/type-system/interfaces.md index 9610ce0..6e7501f 100644 --- a/docs/type-system/interfaces.md +++ b/docs/type-system/interfaces.md @@ -103,7 +103,7 @@ $humanType = new ObjectType([ ``` In this case field definitions are created only once (as a part of Interface Type) and then -re-used by all interface implementors. It can save several microseconds and memory + ensures that +re-used by all interface implementors. It can save several microseconds and kilobytes + ensures that field definitions of Interface and implementors are always in sync. Yet it creates a problem with resolution of such fields. There are two ways how shared fields could diff --git a/docs/type-system/lists-and-nonnulls.md b/docs/type-system/lists-and-nonnulls.md index f061bb2..89a5fde 100644 --- a/docs/type-system/lists-and-nonnulls.md +++ b/docs/type-system/lists-and-nonnulls.md @@ -21,13 +21,13 @@ $userType = new ObjectType([ ]); ``` -Resolvers for such fields are expected to return `array` or instance of `Traversable` interface -(`null` is allowed by default too). +Resolvers for such fields are expected to return `array` or instance of PHP internal `Traversable` +interface (`null` is allowed by default too). If returned value is not of one of these types - **graphql-php** will add an error to result and set field value to `null` (only if field is nullable, see below for non-null fields). -# Non-Null types +# Non-Null fields By default in GraphQL every field can have `null` value. To indicate that some field always returns `non-null` value - use `GraphQL\Type\Definition\Type::nonNull()` modifier: