docs(apollo-link-ws): change example to prevent a typescript error (#4553)
docs(apollo-link-ws): change example to prevent a typescript error (#4553)

The `getMainDefinition` function returns a union type of
`OperationDefinitionNode | FragmentDefinitionNode`, but
`FragmentDefinitionNode` does not have an `operation` field, so
the destructuring in this example was unsafe. Fortunately,
`definition.operation` becomes safe once we ensure that
`definition.kind === 'OperationDefinition'`.
apollostack/apollo-client,apollostack/apollo-client,apollostack/apollo-client,apollographql/apollo-client,apollographql/apollo-client