Closed eshelyaron closed 2 years ago
Thanks! Looks mostly good. I propose to put the whole thing into one file though. It is small enough and a single file is simply easier to manage. Some other points:
HTTP_PL_FILES
to get it installed."a"
, i.e., using double quotes. That is standard compliant. The SWI-Prolog DCG compiler recognises strings and compiles them appropriately. There should be no need for [95]
, etc., just "_"
should do.memberchk(C, [34, 92, 47, 0'b, 0'f, 0'n, 0'r, 0't])
can be memberchk(C, `\/bfnrt`)
.Now need to do some cooking :smile:
Thanks for the swift review!
I had a misconception that some non-default flag was required for "a"
literals in DCGs, that's good to know.
I've addressed the above points in the latest commit https://github.com/SWI-Prolog/packages-http/pull/153/commits/8eab5291976ce42593a5fc15315d6510412f42f4.
Thanks for all the updates. Made two more changes, re-running the dependencies (I saw some calls colored indicating they still needed unspecified autoloading), removed the asserts for paths in the test files. You find these in many places, but they are no longer needed since the move to CMake.
Finally squashed the branch. As this is the first release, the history is irrelevant.
Note that you can use PceEmacs or gxref/0 to find remaining autoload issues. Another option is to load the test file, disable autoloading and run the tests.
This PR adds the following:
graphql_execute_document(+URI, +Document, -Result, +Options)
for requesting a remote GraphQL endpoint located atURI
to executeDocument
, unifyingResult
with the result.If the API looks alright, I'll work on a more comprehensive test suite, at least for the reader/writer parts.