fix(core): gql file upload (#9134)

This commit is contained in:
darkskygit
2024-12-12 14:38:09 +00:00
parent 152a406ced
commit 76f2c31e46
2 changed files with 2 additions and 2 deletions

View File

@@ -138,7 +138,7 @@ module.exports = {
if (schema.getType(type)?.name === 'Upload') return true;
const typeDef = schema.getType(type);
const fields = typeDef.getFields?.();
if (!fields || !fields.length) return false;
if (!fields || typeof fields !== 'object') return false;
for (let field of Object.values(fields)) {
let type = field.type;
while (type.ofType) {

View File

@@ -188,7 +188,7 @@ export const createCopilotMessageMutation = {
id: 'createCopilotMessageMutation' as const,
operationName: 'createCopilotMessage',
definitionName: 'createCopilotMessage',
containsFile: false,
containsFile: true,
query: `
mutation createCopilotMessage($options: CreateChatMessageInput!) {
createCopilotMessage(options: $options)