Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
args,
null,
gqlTypes.selectionSet([
gqlTypes.field(gqlTypes.name('id')),
])
),
]),
gqlTypes.name(queryType.name),
apolloArgs
),
]);
}
return gqlTypes.document([
gqlTypes.operationDefinition(
QUERY_TYPES.includes(aorFetchType) ? 'query' : 'mutation',
gqlTypes.selectionSet([
gqlTypes.field(
gqlTypes.name(queryType.name),
gqlTypes.name('data'),
args,
null,
gqlTypes.selectionSet(fields)
),
]),
gqlTypes.name(queryType.name),
apolloArgs
),
]);
};
},
});
}
const query = {
params: apolloArgs,
fields: {
data: {
field: queryType.name,
params: args,
fields,
},
},
};
const result = QUERY_TYPES.includes(aorFetchType)
? encodeQuery(queryType.name, query)
: encodeMutation(queryType.name, query);
return result;
};
args,
null,
gqlTypes.selectionSet([
gqlTypes.field(gqlTypes.name('id')),
])
),
]),
gqlTypes.name(queryType.name),
apolloArgs
),
]);
}
return gqlTypes.document([
gqlTypes.operationDefinition(
QUERY_TYPES.includes(aorFetchType) ? 'query' : 'mutation',
gqlTypes.selectionSet([
gqlTypes.field(
gqlTypes.name(queryType.name),
gqlTypes.name('data'),
args,
null,
gqlTypes.selectionSet(fields)
),
]),
gqlTypes.name(queryType.name),
apolloArgs
),
]);
};
alias: gqlTypes.name('data'),
arguments: args,
selectionSet: gqlTypes.selectionSet([
gqlTypes.field(gqlTypes.name('id'))
])
})
]),
gqlTypes.name(queryType.name!),
apolloArgs
)
]);
}
return gqlTypes.document([
gqlTypes.operationDefinition(
QUERY_TYPES.includes(aorFetchType) ? 'query' : 'mutation',
gqlTypes.selectionSet([
gqlTypes.field(gqlTypes.name(queryType.name!), {
alias: gqlTypes.name('data'),
arguments: args,
selectionSet: gqlTypes.selectionSet(fields)
})
]),
gqlTypes.name(queryType.name!),
apolloArgs
)
]);
};
},
});
}
const query = {
params: apolloArgs,
fields: {
data: {
field: queryType.name,
params: args,
fields,
},
},
};
const result = QUERY_TYPES.includes(aorFetchType)
? encodeQuery(queryType.name, query)
: encodeMutation(queryType.name, query);
return result;
};