graphql-mutation

How to update a issue or PR comment in Github using curl and a GraphQL updateIssueComment mutation

夙愿已清 提交于 2021-01-29 05:33:15
问题 I want to update a comment in a Github PR or issue and I found it hard to find a working example. That's why I ask this question, to answer it myself. Hopefully someone else can use this. 回答1: The following snippet will update an issue or PR comment using a GraphQL mutation and curl. Make sure you replace <REPLACE WITH YOUR GITHUB PERSONAL ACCESS TOKEN> with an access token that has repo scope on the repo in which the PR/issue appears. Then replace the REPLACE WITH COMMENT NODE ID with the

How to execute a directive before a mutation is committed to the database?

懵懂的女人 提交于 2021-01-05 07:43:25
问题 I'm trying to add the internationalization feature to my database. It would be quite difficult to maintain a schema graphql if I needed to duplicate all translatable fields type Quest { name @i18n # simple } type Quest { nameEn nameJa nameFr ... # omg } The problem I'm facing is that field directives are only executed during a query (or, once a mutation has finished, to return the result). I do not see how I could do something similar with resolvers. For any possible mutation, I want to check

How to send byte array (Blob) to GraphQL mutation

感情迁移 提交于 2019-12-23 03:25:23
问题 We have a GraphQL mutation with a byte array (Blob) field. How can I use tools like Insomnia or GraphQL playground to send byte array data to test the API? mutation { saveSomething(something: { contentByteArray: [97, 110, 103, 101, 108, 111] }) { content } } 来源: https://stackoverflow.com/questions/57446927/how-to-send-byte-array-blob-to-graphql-mutation