Skip to content

Need a migration guide for moving from 3.x to 4.x #213

@wravery

Description

@wravery

The migration from 3.x to 4.x is challenging. I've been meaning to start a migration guide based on a couple of samples I've migrated. Here's a list of topics I think should be covered, essentially an outline for the doc (will update with more as they come up):

  • C++17 to C++20:
    • Describe the toolchain requirements with links to the code and samples.
    • Describe how to use custom Awaitables with links to the unit tests.
    • Describe how to implement field accessors as a coroutine.
  • Removing inheritance and replacing with type-erased wrappers:
  • Simplify the field accessor signatures:
    • Return wrapped types directly (unless implementing a coroutine).
    • Make methods const or non-const as appropriate (can also get rid of a lot of mutable member variables this way).
    • Pass parameters by const& reference, && r-value reference, or value.
    • Drop unused service::FieldParams arguments.
  • Using the new CMake functions:
  • Links to migration commits in sample and external projects:
    • gqlmapi
    • electron-cppgraphql
    • samples in this repo (e.g. replacing all of the "unified" schemas with --separate-files versions, converting TodayMock.* implementations, etc.)

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions