Skip to content
This repository has been archived by the owner on Sep 3, 2021. It is now read-only.

Exclude subscription type when augmenting queries #323

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -1086,6 +1086,10 @@ export const excludeIgnoredTypes = (typeMap, config = {}) => {
// If .query is an object and .exclude is provided, use it, else use new arr
let excludedQueries = getExcludedTypes(config, 'query');
let excludedMutations = getExcludedTypes(config, 'mutation');

// Exclude `type Subscription`, to prevent it from being misinterpreted as a query type
excludedQueries.push('Subscription');

// Add any ignored types to exclusion arrays
Object.keys(typeMap).forEach(name => {
if (
Expand Down