mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-19 15:26:59 +08:00
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;
|
||||
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) {
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user