fix(core): gql file upload (#9134)
This commit is contained in:
@@ -138,7 +138,7 @@ module.exports = {
|
|||||||
if (schema.getType(type)?.name === 'Upload') return true;
|
if (schema.getType(type)?.name === 'Upload') return true;
|
||||||
const typeDef = schema.getType(type);
|
const typeDef = schema.getType(type);
|
||||||
const fields = typeDef.getFields?.();
|
const fields = typeDef.getFields?.();
|
||||||
if (!fields || !fields.length) return false;
|
if (!fields || typeof fields !== 'object') return false;
|
||||||
for (let field of Object.values(fields)) {
|
for (let field of Object.values(fields)) {
|
||||||
let type = field.type;
|
let type = field.type;
|
||||||
while (type.ofType) {
|
while (type.ofType) {
|
||||||
|
|||||||
@@ -188,7 +188,7 @@ export const createCopilotMessageMutation = {
|
|||||||
id: 'createCopilotMessageMutation' as const,
|
id: 'createCopilotMessageMutation' as const,
|
||||||
operationName: 'createCopilotMessage',
|
operationName: 'createCopilotMessage',
|
||||||
definitionName: 'createCopilotMessage',
|
definitionName: 'createCopilotMessage',
|
||||||
containsFile: false,
|
containsFile: true,
|
||||||
query: `
|
query: `
|
||||||
mutation createCopilotMessage($options: CreateChatMessageInput!) {
|
mutation createCopilotMessage($options: CreateChatMessageInput!) {
|
||||||
createCopilotMessage(options: $options)
|
createCopilotMessage(options: $options)
|
||||||
|
|||||||
Reference in New Issue
Block a user