Created
September 24, 2017 18:12
-
-
Save Cerberus/320f6eb4152bef6badb85f055a93bec1 to your computer and use it in GitHub Desktop.
hasSubscriptionOperation function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const hasSubscriptionOperation = ({ query: { definitions } }) => | |
definitions.some( | |
({ kind, operation }) => | |
kind === 'OperationDefinition' && operation === 'subscription', | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment