From e46d37c681fb01d817199f92735fe868f802851d Mon Sep 17 00:00:00 2001 From: Matthew Marcus Date: Wed, 2 Mar 2016 16:41:31 -0800 Subject: [PATCH] Documentation for null initialization of initialVariables Summary:Added information in Container API docs for null usage in initialVariables. Fixes https://github.com/facebook/relay/issues/700 Closes https://github.com/facebook/relay/pull/701 Differential Revision: D3001979 Pulled By: yungsters fb-gh-sync-id: ceaf7e4cf0f45ed4f354a041b6ab474b66d23eff shipit-source-id: ceaf7e4cf0f45ed4f354a041b6ab474b66d23eff --- docs/APIReference-Container.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/APIReference-Container.md b/docs/APIReference-Container.md index 9660cafaab435..8f3cee4e844c4 100644 --- a/docs/APIReference-Container.md +++ b/docs/APIReference-Container.md @@ -134,6 +134,9 @@ module.exports = Relay.createContainer(ProfilePicture, { fragments: { user: () => Relay.QL` # The variable defined above is available here as `$size`. + # Any variable referenced here is required to have been defined in initialVariables above. + # An `undefined` variable value will throw an `Invariant Violation` exception. + # Use `null` to initialize unknown values. fragment on User { profilePicture(size: $size) { ... } } `, },