Add Files (not images) to product with GraphQL API

Hi,

I use GraphQL API to create collections and products. I know how to create images and add these images to a product. I also would like to add some pdfs to a product. To create a file, I use the mutation fileCreate. But how do I link this file to a product. I can’t find any product-id field.

Thank you.

Don’t suppose you work this out did you? The ability to use the filename of files is important to me, so I like using that rather than productCreateMedia

Update: I thin this is one way to do it: https://community.shopify.com/c/graphql-basics-and/uploading-files-to-shopify-and-attaching-them-to-products/td-p/2638545

Thanks

Grant