Skip to content

Commit

Permalink
Documentation for null initialization of initialVariables
Browse files Browse the repository at this point in the history
Summary:Added information in Container API docs for null usage in initialVariables. Fixes facebook#700
Closes facebook#701

Differential Revision: D3001979

Pulled By: yungsters

fb-gh-sync-id: ceaf7e4cf0f45ed4f354a041b6ab474b66d23eff
shipit-source-id: ceaf7e4cf0f45ed4f354a041b6ab474b66d23eff
  • Loading branch information
Matthew Marcus authored and venepe committed Mar 7, 2016
1 parent 8c247dc commit e46d37c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/APIReference-Container.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) { ... } }
`,
},
Expand Down

0 comments on commit e46d37c

Please sign in to comment.