branch: externals/graphql commit e66ffb7743de2608151cc9de531a958c37cf5a56 Author: Sean Allred <c...@seanallred.com> Commit: Sean Allred <c...@seanallred.com>
Test suite fixes --- graphql.el | 2 +- test/graphql.el-test.el | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/graphql.el b/graphql.el index ac3e83c6c6..a57baacd01 100644 --- a/graphql.el +++ b/graphql.el @@ -171,7 +171,7 @@ Calling pattern: Parameters are formatted as defined by `graphql--encode-parameter-spec'." - (graphql--genform-operation args 'query)) + (graphql--genform-operation args 'mutation)) (provide 'graphql) ;;; graphql.el ends here diff --git a/test/graphql.el-test.el b/test/graphql.el-test.el index a48f18ee7e..40750e384d 100644 --- a/test/graphql.el-test.el +++ b/test/graphql.el-test.el @@ -36,9 +36,7 @@ (issues :arguments ((first . 20)) (edges (node number title url)))))) - (concat - "query{repository(owner:\"my-owner\",name:\"my-repo-name\")" - "{issues(first:20){edges{node{number title url}}}}}"))) + "query{repository(owner:\"my-owner\",name:\"my-repo-name\"){issues(first:20){edges{node{number title url}}}}}")) (should (string= (graphql-encode '(addReaction :arguments ((input . ((subjectId . "MDU6SXNzdWUxNzc2MzA3Mjk=") @@ -52,7 +50,10 @@ (should (string= (graphql-query (test ((ep Episode !) (review ReviewInput ! . 50))) (repository :arguments ((hello . ($ ep))))) - "query test($ep:Episode!,$review:ReviewInput!=50){repository(hello:$ep)}")) ) + "query test($ep:Episode!,$review:ReviewInput!=50){repository(hello:$ep)}")) + (should (string= (graphql-mutation (testMutation ((ep Episode . ((complex . params))))) + (change thing)) + "mutation testMutation($ep:Episode!){change{thing}}"))) (ert-deftest encode-complicated () (should (string= (graphql-query (test ((ep Episode . ((complex . params)