Skip to content

uploadFile mutation in AI chat uses wrong Apollo client (sends to /graphql instead of /metadata)Β #18153

@Hamzasoinq

Description

@Hamzasoinq

uploadFile mutation in AI chat uses wrong Apollo client (sends to /graphql instead of /metadata)

File uploads in the AI chat (Agent Chat) fail with "Failed to upload file: [filename]" for all file
types.

Root Cause:

useAIChatFileUpload.ts explicitly passes useApolloCoreClient() as the Apollo client for
useUploadFileMutation. The "core" client points to the /graphql (workspace) endpoint. However,
FileUploadResolver is decorated with @MetadataResolver(), meaning uploadFile is only registered on the
/metadata endpoint.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    βœ… Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions