Graphcool / graphcool-framework

Apache License 2.0
1.77k stars 130 forks source link

Overwriting Graphcool files #95

Open marktani opened 6 years ago

marktani commented 6 years ago

Issue by sedubois Tuesday Jun 20, 2017 at 09:45 GMT Originally opened as https://github.com/graphcool/prisma/issues/261


Once a Graphcool file has been uploaded, it's sometimes necessary to overwrite it while maintaining its URL (e.g to edit a mistake, etc).

It's important to keep the same file URL when some code still needs to refer to the URL directly instead of fetching the URL through the GraphQL API (which can happen e.g. when migrating an old codebase, or just for simplicity's sake).

Sorry if this is already possible, but didn't find any documentation about it.

marktani commented 6 years ago

Comment by kbrandwijk Tuesday Jun 20, 2017 at 11:47 GMT


If you're referring to the Graphcool cli, you can use graphcool push to update your current project with local changes to the .graphcool project file.

marktani commented 6 years ago

Comment by sedubois Tuesday Jun 20, 2017 at 12:43 GMT


Sorry. I mean the files at files.graph.cool.

marktani commented 6 years ago

Comment by kbrandwijk Tuesday Jun 20, 2017 at 12:47 GMT


That's not possible out of the box. I have created an example for a file proxy that is currently under review, that would easily enable you to do so.

marktani commented 6 years ago

Comment by sedubois Wednesday Sep 13, 2017 at 12:52 GMT


@marktani any news on this? It still appears quite necessary to me. It's an operation that is routinely needed during maintenance/editing of most kinds of digital content probably, as well as during putting content online where we have no choice but uploading content to its final web context to be able to check for issues, then to update/edit the file accordingly, often several times.

Needing to upload a new file every time then manually deleting the previous one, also leads to inconsistency issues, e.g forgetting the old broken file in the file storage, which leads to confusion as to which version is the right one.