Skip to content

Code cleanup #242

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 4 commits into from
May 5, 2022
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 cmake/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.2.0
4.3.0
4 changes: 2 additions & 2 deletions include/graphqlservice/internal/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@

namespace graphql::internal {

constexpr std::string_view FullVersion { "4.2.0" };
constexpr std::string_view FullVersion { "4.3.0" };

constexpr size_t MajorVersion = 4;
constexpr size_t MinorVersion = 2;
constexpr size_t MinorVersion = 3;
constexpr size_t PatchVersion = 0;

} // namespace graphql::internal
Expand Down
4 changes: 2 additions & 2 deletions include/graphqlservice/introspection/IntrospectionSchema.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@

#include "graphqlservice/internal/Schema.h"

// Check if the library version is compatible with schemagen 4.2.0
// Check if the library version is compatible with schemagen 4.3.0
static_assert(graphql::internal::MajorVersion == 4, "regenerate with schemagen: major version mismatch");
static_assert(graphql::internal::MinorVersion == 2, "regenerate with schemagen: minor version mismatch");
static_assert(graphql::internal::MinorVersion == 3, "regenerate with schemagen: minor version mismatch");

#include <array>
#include <memory>
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,2,0,0
#define GRAPHQL_RC_VERSION_STR "4.2.0"
#define GRAPHQL_RC_VERSION 4,3,0,0
#define GRAPHQL_RC_VERSION_STR "4.3.0"

#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,2,0,0
#define GRAPHQL_RC_VERSION_STR "4.2.0"
#define GRAPHQL_RC_VERSION 4,3,0,0
#define GRAPHQL_RC_VERSION_STR "4.3.0"

#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,2,0,0
#define GRAPHQL_RC_VERSION_STR "4.2.0"
#define GRAPHQL_RC_VERSION 4,3,0,0
#define GRAPHQL_RC_VERSION_STR "4.3.0"

#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,2,0,0
#define GRAPHQL_RC_VERSION_STR "4.2.0"
#define GRAPHQL_RC_VERSION 4,3,0,0
#define GRAPHQL_RC_VERSION_STR "4.3.0"

#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,2,0,0
#define GRAPHQL_RC_VERSION_STR "4.2.0"
#define GRAPHQL_RC_VERSION 4,3,0,0
#define GRAPHQL_RC_VERSION_STR "4.3.0"

#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,2,0,0
#define GRAPHQL_RC_VERSION_STR "4.2.0"
#define GRAPHQL_RC_VERSION 4,3,0,0
#define GRAPHQL_RC_VERSION_STR "4.3.0"

#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,2,0,0
#define GRAPHQL_RC_VERSION_STR "4.2.0"
#define GRAPHQL_RC_VERSION 4,3,0,0
#define GRAPHQL_RC_VERSION_STR "4.3.0"

#ifndef DEBUG
#define VER_DEBUG 0
Expand Down
22 changes: 11 additions & 11 deletions samples/client/benchmark/BenchmarkClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@

#include "graphqlservice/internal/Version.h"

// Check if the library version is compatible with clientgen 4.2.0
// Check if the library version is compatible with clientgen 4.3.0
static_assert(graphql::internal::MajorVersion == 4, "regenerate with clientgen: major version mismatch");
static_assert(graphql::internal::MinorVersion == 2, "regenerate with clientgen: minor version mismatch");
static_assert(graphql::internal::MinorVersion == 3, "regenerate with clientgen: minor version mismatch");

#include <optional>
#include <string>
Expand Down Expand Up @@ -50,10 +50,10 @@ namespace graphql::client {
namespace benchmark {

// Return the original text of the request document.
const std::string& GetRequestText() noexcept;
[[nodiscard]] const std::string& GetRequestText() noexcept;

// Return a pre-parsed, pre-validated request object.
const peg::ast& GetRequestObject() noexcept;
[[nodiscard]] const peg::ast& GetRequestObject() noexcept;

} // namespace benchmark

Expand All @@ -63,20 +63,20 @@ using benchmark::GetRequestText;
using benchmark::GetRequestObject;

// Return the name of this operation in the shared request document.
const std::string& GetOperationName() noexcept;
[[nodiscard]] const std::string& GetOperationName() noexcept;

struct Response
struct [[nodiscard]] Response
{
struct appointments_AppointmentConnection
struct [[nodiscard]] appointments_AppointmentConnection
{
struct pageInfo_PageInfo
struct [[nodiscard]] pageInfo_PageInfo
{
bool hasNextPage {};
};

struct edges_AppointmentEdge
struct [[nodiscard]] edges_AppointmentEdge
{
struct node_Appointment
struct [[nodiscard]] node_Appointment
{
response::IdType id {};
std::optional<response::Value> when {};
Expand All @@ -94,7 +94,7 @@ struct Response
appointments_AppointmentConnection appointments {};
};

Response parseResponse(response::Value&& response);
[[nodiscard]] Response parseResponse(response::Value&& response);

} // namespace query::Query
} // namespace graphql::client
Expand Down
68 changes: 34 additions & 34 deletions samples/client/multiple/MultipleQueriesClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@

#include "graphqlservice/internal/Version.h"

// Check if the library version is compatible with clientgen 4.2.0
// Check if the library version is compatible with clientgen 4.3.0
static_assert(graphql::internal::MajorVersion == 4, "regenerate with clientgen: major version mismatch");
static_assert(graphql::internal::MinorVersion == 2, "regenerate with clientgen: minor version mismatch");
static_assert(graphql::internal::MinorVersion == 3, "regenerate with clientgen: minor version mismatch");

#include <optional>
#include <string>
Expand Down Expand Up @@ -112,10 +112,10 @@ namespace graphql::client {
namespace multiple {

// Return the original text of the request document.
const std::string& GetRequestText() noexcept;
[[nodiscard]] const std::string& GetRequestText() noexcept;

// Return a pre-parsed, pre-validated request object.
const peg::ast& GetRequestObject() noexcept;
[[nodiscard]] const peg::ast& GetRequestObject() noexcept;

enum class [[nodiscard]] TaskState
{
Expand All @@ -125,7 +125,7 @@ enum class [[nodiscard]] TaskState
Unassigned,
};

struct CompleteTaskInput
struct [[nodiscard]] CompleteTaskInput
{
response::IdType id {};
std::optional<TaskState> testTaskState {};
Expand All @@ -141,15 +141,15 @@ using multiple::GetRequestText;
using multiple::GetRequestObject;

// Return the name of this operation in the shared request document.
const std::string& GetOperationName() noexcept;
[[nodiscard]] const std::string& GetOperationName() noexcept;

struct Response
struct [[nodiscard]] Response
{
struct appointments_AppointmentConnection
struct [[nodiscard]] appointments_AppointmentConnection
{
struct edges_AppointmentEdge
struct [[nodiscard]] edges_AppointmentEdge
{
struct node_Appointment
struct [[nodiscard]] node_Appointment
{
response::IdType id {};
std::optional<std::string> subject {};
Expand All @@ -167,7 +167,7 @@ struct Response
appointments_AppointmentConnection appointments {};
};

Response parseResponse(response::Value&& response);
[[nodiscard]] Response parseResponse(response::Value&& response);

} // namespace query::Appointments

Expand All @@ -177,15 +177,15 @@ using multiple::GetRequestText;
using multiple::GetRequestObject;

// Return the name of this operation in the shared request document.
const std::string& GetOperationName() noexcept;
[[nodiscard]] const std::string& GetOperationName() noexcept;

struct Response
struct [[nodiscard]] Response
{
struct tasks_TaskConnection
struct [[nodiscard]] tasks_TaskConnection
{
struct edges_TaskEdge
struct [[nodiscard]] edges_TaskEdge
{
struct node_Task
struct [[nodiscard]] node_Task
{
response::IdType id {};
std::optional<std::string> title {};
Expand All @@ -202,7 +202,7 @@ struct Response
tasks_TaskConnection tasks {};
};

Response parseResponse(response::Value&& response);
[[nodiscard]] Response parseResponse(response::Value&& response);

} // namespace query::Tasks

Expand All @@ -212,15 +212,15 @@ using multiple::GetRequestText;
using multiple::GetRequestObject;

// Return the name of this operation in the shared request document.
const std::string& GetOperationName() noexcept;
[[nodiscard]] const std::string& GetOperationName() noexcept;

struct Response
struct [[nodiscard]] Response
{
struct unreadCounts_FolderConnection
struct [[nodiscard]] unreadCounts_FolderConnection
{
struct edges_FolderEdge
struct [[nodiscard]] edges_FolderEdge
{
struct node_Folder
struct [[nodiscard]] node_Folder
{
response::IdType id {};
std::optional<std::string> name {};
Expand All @@ -237,7 +237,7 @@ struct Response
unreadCounts_FolderConnection unreadCounts {};
};

Response parseResponse(response::Value&& response);
[[nodiscard]] Response parseResponse(response::Value&& response);

} // namespace query::UnreadCounts

Expand All @@ -247,13 +247,13 @@ using multiple::GetRequestText;
using multiple::GetRequestObject;

// Return the name of this operation in the shared request document.
const std::string& GetOperationName() noexcept;
[[nodiscard]] const std::string& GetOperationName() noexcept;

using multiple::TaskState;

struct Response
struct [[nodiscard]] Response
{
struct anyType_UnionType
struct [[nodiscard]] anyType_UnionType
{
std::string _typename {};
response::IdType id {};
Expand All @@ -269,7 +269,7 @@ struct Response
std::optional<std::string> default_ {};
};

Response parseResponse(response::Value&& response);
[[nodiscard]] Response parseResponse(response::Value&& response);

} // namespace query::Miscellaneous

Expand All @@ -279,25 +279,25 @@ using multiple::GetRequestText;
using multiple::GetRequestObject;

// Return the name of this operation in the shared request document.
const std::string& GetOperationName() noexcept;
[[nodiscard]] const std::string& GetOperationName() noexcept;

using multiple::TaskState;

using multiple::CompleteTaskInput;

struct Variables
struct [[nodiscard]] Variables
{
std::unique_ptr<CompleteTaskInput> input {};
bool skipClientMutationId {};
};

response::Value serializeVariables(Variables&& variables);
[[nodiscard]] response::Value serializeVariables(Variables&& variables);

struct Response
struct [[nodiscard]] Response
{
struct completedTask_CompleteTaskPayload
struct [[nodiscard]] completedTask_CompleteTaskPayload
{
struct completedTask_Task
struct [[nodiscard]] completedTask_Task
{
response::IdType completedTaskId {};
std::optional<std::string> title {};
Expand All @@ -311,7 +311,7 @@ struct Response
completedTask_CompleteTaskPayload completedTask {};
};

Response parseResponse(response::Value&& response);
[[nodiscard]] Response parseResponse(response::Value&& response);

} // namespace mutation::CompleteTaskMutation
} // namespace graphql::client
Expand Down
Loading