Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:
runs-on: macos-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true

- name: Cache vcpkg
uses: actions/cache@v2
uses: actions/cache@v3
id: cache-vcpkg
with:
path: build/vcpkg_installed/
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ jobs:
runs-on: windows-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true

- name: Set target triplet
id: set-variables
shell: pwsh
run: echo "::set-output name=vcpkg_triplet::${{ matrix.arch }}-windows$(if ('${{ matrix.libs }}' -eq 'static') { '-static' })"
run: echo "vcpkg_triplet=${{ matrix.arch }}-windows$(if ('${{ matrix.libs }}' -eq 'static') { '-static' })" >> $env:GITHUB_OUTPUT

- name: Cache vcpkg
uses: actions/cache@v2
uses: actions/cache@v3
id: cache-vcpkg
with:
path: build/vcpkg_installed/
Expand Down
2 changes: 1 addition & 1 deletion cmake/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.5.1
4.5.2
4 changes: 2 additions & 2 deletions include/graphqlservice/internal/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@

namespace graphql::internal {

constexpr std::string_view FullVersion { "4.5.1" };
constexpr std::string_view FullVersion { "4.5.2" };

constexpr size_t MajorVersion = 4;
constexpr size_t MinorVersion = 5;
constexpr size_t PatchVersion = 1;
constexpr size_t PatchVersion = 2;

} // namespace graphql::internal

Expand Down
4 changes: 2 additions & 2 deletions res/ClientGen.rc
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

#include <winver.h>

#define GRAPHQL_RC_VERSION 4,5,1,0
#define GRAPHQL_RC_VERSION_STR "4.5.1"
#define GRAPHQL_RC_VERSION 4,5,2,0
#define GRAPHQL_RC_VERSION_STR "4.5.2"

#ifndef DEBUG
#define VER_DEBUG 0
Expand Down
4 changes: 2 additions & 2 deletions res/SchemaGen.rc
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

#include <winver.h>

#define GRAPHQL_RC_VERSION 4,5,1,0
#define GRAPHQL_RC_VERSION_STR "4.5.1"
#define GRAPHQL_RC_VERSION 4,5,2,0
#define GRAPHQL_RC_VERSION_STR "4.5.2"

#ifndef DEBUG
#define VER_DEBUG 0
Expand Down
4 changes: 2 additions & 2 deletions res/graphqlclient_version.rc
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

#include <winver.h>

#define GRAPHQL_RC_VERSION 4,5,1,0
#define GRAPHQL_RC_VERSION_STR "4.5.1"
#define GRAPHQL_RC_VERSION 4,5,2,0
#define GRAPHQL_RC_VERSION_STR "4.5.2"

#ifndef DEBUG
#define VER_DEBUG 0
Expand Down
4 changes: 2 additions & 2 deletions res/graphqljson_version.rc
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

#include <winver.h>

#define GRAPHQL_RC_VERSION 4,5,1,0
#define GRAPHQL_RC_VERSION_STR "4.5.1"
#define GRAPHQL_RC_VERSION 4,5,2,0
#define GRAPHQL_RC_VERSION_STR "4.5.2"

#ifndef DEBUG
#define VER_DEBUG 0
Expand Down
4 changes: 2 additions & 2 deletions res/graphqlpeg_version.rc
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

#include <winver.h>

#define GRAPHQL_RC_VERSION 4,5,1,0
#define GRAPHQL_RC_VERSION_STR "4.5.1"
#define GRAPHQL_RC_VERSION 4,5,2,0
#define GRAPHQL_RC_VERSION_STR "4.5.2"

#ifndef DEBUG
#define VER_DEBUG 0
Expand Down
4 changes: 2 additions & 2 deletions res/graphqlresponse_version.rc
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

#include <winver.h>

#define GRAPHQL_RC_VERSION 4,5,1,0
#define GRAPHQL_RC_VERSION_STR "4.5.1"
#define GRAPHQL_RC_VERSION 4,5,2,0
#define GRAPHQL_RC_VERSION_STR "4.5.2"

#ifndef DEBUG
#define VER_DEBUG 0
Expand Down
4 changes: 2 additions & 2 deletions res/graphqlservice_version.rc
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

#include <winver.h>

#define GRAPHQL_RC_VERSION 4,5,1,0
#define GRAPHQL_RC_VERSION_STR "4.5.1"
#define GRAPHQL_RC_VERSION 4,5,2,0
#define GRAPHQL_RC_VERSION_STR "4.5.2"

#ifndef DEBUG
#define VER_DEBUG 0
Expand Down
9 changes: 5 additions & 4 deletions samples/client/multiple/MultipleQueriesClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,12 @@ enum class [[nodiscard]] TaskState

struct [[nodiscard]] CompleteTaskInput
{
explicit CompleteTaskInput() noexcept = default;
explicit CompleteTaskInput(
response::IdType idArg = response::IdType {},
std::optional<TaskState> testTaskStateArg = std::optional<TaskState> {},
std::optional<bool> isCompleteArg = std::optional<bool> {},
std::optional<std::string> clientMutationIdArg = std::optional<std::string> {}) noexcept;
response::IdType idArg,
std::optional<TaskState> testTaskStateArg,
std::optional<bool> isCompleteArg,
std::optional<std::string> clientMutationIdArg) noexcept;
CompleteTaskInput(const CompleteTaskInput& other);
CompleteTaskInput(CompleteTaskInput&& other) noexcept;

Expand Down
9 changes: 5 additions & 4 deletions samples/client/mutate/MutateClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,12 @@ enum class [[nodiscard]] TaskState

struct [[nodiscard]] CompleteTaskInput
{
explicit CompleteTaskInput() noexcept = default;
explicit CompleteTaskInput(
response::IdType idArg = response::IdType {},
std::optional<TaskState> testTaskStateArg = std::optional<TaskState> {},
std::optional<bool> isCompleteArg = std::optional<bool> {},
std::optional<std::string> clientMutationIdArg = std::optional<std::string> {}) noexcept;
response::IdType idArg,
std::optional<TaskState> testTaskStateArg,
std::optional<bool> isCompleteArg,
std::optional<std::string> clientMutationIdArg) noexcept;
CompleteTaskInput(const CompleteTaskInput& other);
CompleteTaskInput(CompleteTaskInput&& other) noexcept;

Expand Down
22 changes: 13 additions & 9 deletions samples/client/nestedinput/NestedInputClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ namespace nestedinput {

struct [[nodiscard]] InputA
{
explicit InputA() noexcept = default;
explicit InputA(
bool aArg = bool {}) noexcept;
bool aArg) noexcept;
InputA(const InputA& other);
InputA(InputA&& other) noexcept;

Expand All @@ -59,8 +60,9 @@ struct [[nodiscard]] InputA

struct [[nodiscard]] InputB
{
explicit InputB() noexcept = default;
explicit InputB(
double bArg = double {}) noexcept;
double bArg) noexcept;
InputB(const InputB& other);
InputB(InputB&& other) noexcept;

Expand All @@ -74,12 +76,13 @@ struct InputBC;

struct [[nodiscard]] InputABCD
{
explicit InputABCD() noexcept = default;
explicit InputABCD(
std::string dArg = std::string {},
InputA aArg = InputA {},
InputB bArg = InputB {},
std::vector<InputBC> bcArg = std::vector<InputBC> {},
int valueArg = int {}) noexcept;
std::string dArg,
InputA aArg,
InputB bArg,
std::vector<InputBC> bcArg,
int valueArg) noexcept;
InputABCD(const InputABCD& other);
InputABCD(InputABCD&& other) noexcept;

Expand All @@ -95,9 +98,10 @@ struct [[nodiscard]] InputABCD

struct [[nodiscard]] InputBC
{
explicit InputBC() noexcept = default;
explicit InputBC(
response::IdType cArg = response::IdType {},
InputB bArg = InputB {}) noexcept;
response::IdType cArg,
InputB bArg) noexcept;
InputBC(const InputBC& other);
InputBC(InputBC&& other) noexcept;

Expand Down
10 changes: 8 additions & 2 deletions src/ClientGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,13 @@ static_assert(graphql::internal::MinorVersion == )cpp"

for (const auto& inputField : inputType.type->inputFields())
{
if (!firstField)
if (firstField)
{
headerFile << R"cpp() noexcept = default;
explicit )cpp" << cppType
<< R"cpp(()cpp";
}
else
{
headerFile << R"cpp(,)cpp";
}
Expand All @@ -290,7 +296,7 @@ static_assert(graphql::internal::MinorVersion == )cpp"
headerFile << R"cpp(
)cpp" << inputCppType
<< R"cpp( )cpp" << SchemaLoader::getSafeCppName(inputField->name())
<< R"cpp(Arg = )cpp" << inputCppType << R"cpp( {})cpp";
<< R"cpp(Arg)cpp";
}

headerFile << R"cpp() noexcept;
Expand Down