Skip to content

Commit edc653d

Browse files
Copilotwravery
andcommitted
Update documentation version references from v4.x to v5.x
Co-authored-by: wravery <6502881+wravery@users.noreply.github.com>
1 parent 2a39ba3 commit edc653d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,9 +216,9 @@ There are several helper functions for `CMake` declared in
216216
other samples sub-directories for examples of how to use them to automatically rerun the code generators and update
217217
the files in your source directory.
218218

219-
### Migrating from v3.x to main
219+
### Migrating from v4.x to main
220220

221-
Please see the [Migration Guide for v4.x](./doc/migration.md) for more details about upgrading to from the `v3.x` branch
221+
Please see the [Migration Guide for v5.x](./doc/migration.md) for more details about upgrading to from the `v4.x` branch
222222
to the `main` branch. Active development takes place almost entirely in `main`.
223223

224224
### Additional Documentation

doc/migration.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Migration Guide for v4.x
1+
# Migration Guide for v5.x
22

3-
Most of the changes in v4.x affect services generated with `schemagen` more than clients generated with `clientgen`.
3+
Most of the changes in v5.x affect services generated with `schemagen` more than clients generated with `clientgen`.
44

55
## Adopting C++20
66

@@ -159,7 +159,7 @@ By default, earlier versions of `schemagen` would generate a single header and a
159159

160160
For a long time, `schemagen` also supported a `--separate-files` flag which would output a separate header and source file for each object type in the schema. This requires more complicated build logic since the set of files that need to be built can change based on the schema, but the end result is much easier to read and incremental builds are faster.
161161

162-
In v4.x, the separate files option is not only the default, it's the only option. Supporting both modes of code generation would have added too much complexity and too many tradeoffs for the simplified build logic. Instead, v4.x adds several CMake helper functions in [cmake/cppgraphqlgen-functions.cmake](../cmake/cppgraphqlgen-functions.cmake) which encapsulate the best practices for regenerating and building the schema targets dynamically when the schema file changes. These functions are automatically included by `find_package(cppgraphqlgen)`.
162+
In v5.x, the separate files option is not only the default, it's the only option. Supporting both modes of code generation would have added too much complexity and too many tradeoffs for the simplified build logic. Instead, v5.x adds several CMake helper functions in [cmake/cppgraphqlgen-functions.cmake](../cmake/cppgraphqlgen-functions.cmake) which encapsulate the best practices for regenerating and building the schema targets dynamically when the schema file changes. These functions are automatically included by `find_package(cppgraphqlgen)`.
163163

164164
Replace custom CMake logic to invoke `schemagen` and `clientgen` with these helper functions:
165165
- `update_graphql_schema_files`: Runs `schemagen` with required parameters and additional optional parameters.
@@ -173,4 +173,4 @@ Declare library targets which automatically include all of the generated files w
173173
- `add_graphql_schema_target`: Declares a library target for the specified schema which depends on the output of `update_graphql_schema_files` and automatically links all of the shared library dependencies needed for a service.
174174
- `add_graphql_client_target`: Declares a library target for the specified client which depends on the output of `update_graphql_client_files` and automatically links all of the shared library dependencies needed for a client.
175175

176-
With all of the refactoring in v4.x, there ceased to be any separation between the `graphqlintrospection` and `graphqlservice` libraries. Even if you use the `--no-introspection` flag with `schemagen`, the generated code still depends on the general schema types which remained in `graphqlintrospection` to perform query validation. As part of the v4.x release, the 2 libraries were combined back into a single `graphqlservice` target. If you use `add_graphql_schema_target` you do not need to worry about this, otherwise you should replace any references to just `graphqlintrospection` with `graphqlservice`.
176+
With all of the refactoring in v5.x, there ceased to be any separation between the `graphqlintrospection` and `graphqlservice` libraries. Even if you use the `--no-introspection` flag with `schemagen`, the generated code still depends on the general schema types which remained in `graphqlintrospection` to perform query validation. As part of the v5.x release, the 2 libraries were combined back into a single `graphqlservice` target. If you use `add_graphql_schema_target` you do not need to worry about this, otherwise you should replace any references to just `graphqlintrospection` with `graphqlservice`.

0 commit comments

Comments
 (0)