GraphQL Issue > Files > GenericFile

Hello,

When I make a graphqL query on “files”.

  • If the query targets image, the results are returned.

  • If the response contains files of type “GenericFile” (pdfs, text files, …), the query triggers an INTERNAL_SERVER_ERROR (Internal error. Looks like something went wrong on our end).

And no matter what filter is used, a simple files(first: 20) will trigger an error because the 20th file is a PDF.

Error number: 012859c0-f561-44db-8dba-a743d3cfa543
Example of query used :
{
{
files(first: 1, query: “filename:toto”) {
edges {
node {
createdAt
alt
… on GenericFile {
id
url
}
… on MediaImage {
id
image {
id
originalSrc: url
width
height
}
}
}
}
}
}files(first: 1, query: “filename:toto”) {
edges {
node {
createdAt
alt
… on GenericFile {
id
url
}
… on MediaImage {
id
image {
id
originalSrc: url
width
height
}
}
}
}
}
}

Hey @Nicolas_TheOz - definitely very strange. One thing that could potentially cause this is if the .PDF’s metadata is formatted in a way that isn’t surfaceable via JSON (for example a URL that isn’t respected as an allowed output in the response).

If you’re still encountering the error, would you be able to share another X-Request-ID with me for a more recent example of the error? The one above (012859c0-f561-44db-8dba-a743d3cfa543) seems to be out of our log retention date.

Hope to hear from you soon.