Skip to content

Clarify clientgen usage in latest version #251

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 11, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,17 +181,16 @@ Command line options:
--no-introspection Do not expect support for Introspection
```

This utility should output one header and one source file for each request document. A request document may contain
more than one operation, in which case you must specify the `--operation` (or `-o`) parameter to indicate which one
should be used to generate the files. If you want to generate client code for more than one operation in the same
document, you will need to run `clientgen` more than once and specify another operation name each time.
This utility should output one header and one source file for each request document. A request document may contain more
than one operation, in which case it will output definitions for all of them together. You may limit the output to a
single operation from the request document by specifying the `--operation` (or `-o`) argument with the operation name.

The generated code depends on the `graphqlclient` library for serialization of built-in types. If you link the generated
code, you'll also need to link `graphqlclient`, `graphqlpeg` for the pre-parsed, pre-validated request AST, and
`graphqlresponse` for the `graphql::response::Value` implementation.

Sample output for `clientgen` is in the sub-directories of [samples/client](samples/client), and each sample is consumed by
a unit test in [test/ClientTests.cpp](test/ClientTests.cpp).
Sample output for `clientgen` is in the sub-directories of [samples/client](samples/client), and several of them are
consumed by unit tests in [test/ClientTests.cpp](test/ClientTests.cpp).

### tests (`GRAPHQL_BUILD_TESTS=ON`)

Expand Down