Skip to content
This repository has been archived by the owner on Jun 22, 2023. It is now read-only.

Commit

Permalink
Release 1.0.0.1003 (#37)
Browse files Browse the repository at this point in the history
* Fix `GetWallets` query format (#36)
  • Loading branch information
BishopJohnson committed Apr 11, 2022
1 parent 3af1cd0 commit 79312d9
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 27 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

## [1.0.0.1003] - 2022-04-11
### Changed
- `GetWallets` query in project schema no longer implements `PaginationArguments`.

### Fixed
- Fixed typo for `result` in `GetWallets.gql` template file for project schema.

## [1.0.0.1002] - 2022-03-01
### Changed
- Updated path to template generation command in root CMakeLists file.
Expand All @@ -30,7 +37,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
### Added
- Initial alpha release.

[Unreleased]: https://github.com/enjin/enjin-cpp-sdk/compare/1.0.0.1002...HEAD
[Unreleased]: https://github.com/enjin/enjin-cpp-sdk/compare/1.0.0.1003...HEAD
[1.0.0.1003]: https://github.com/enjin/enjin-cpp-sdk/compare/1.0.0.1002...1.0.0.1003
[1.0.0.1002]: https://github.com/enjin/enjin-cpp-sdk/compare/1.0.0.1001...1.0.0.1002
[1.0.0.1001]: https://github.com/enjin/enjin-cpp-sdk/compare/1.0.0.1000...1.0.0.1001
[1.0.0.1000]: https://github.com/enjin/enjin-cpp-sdk/releases/tag/1.0.0.1000
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ include(GenerateExportHeader)
### Define project and set properties
project(enjinsdk
LANGUAGES CXX
VERSION 1.0.0.1002)
VERSION 1.0.0.1003)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
Expand Down
2 changes: 1 addition & 1 deletion DOXYFILE
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#---------------------------------------------------------------------------
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = "Enjin C++ SDK"
PROJECT_NUMBER = 1.0.0.1001
PROJECT_NUMBER = 1.0.0.1003
PROJECT_BRIEF = "A C++ SDK for creating games using the Enjin blockchain platform."
PROJECT_LOGO = doxygenIcon.png
OUTPUT_DIRECTORY =
Expand Down
10 changes: 1 addition & 9 deletions include/enjinsdk/project/GetWallets.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

#include "enjinsdk_export.h"
#include "enjinsdk/internal/AbstractGraphqlRequest.hpp"
#include "enjinsdk/shared/PaginationArguments.hpp"
#include "enjinsdk/shared/WalletFragmentArguments.hpp"
#include <optional>
#include <string>
Expand All @@ -28,8 +27,7 @@ namespace enjin::sdk::project {

/// \brief Request for getting wallets from the platform.
class ENJINSDK_EXPORT GetWallets : public graphql::AbstractGraphqlRequest,
public shared::WalletFragmentArguments<GetWallets>,
public shared::PaginationArguments<GetWallets> {
public shared::WalletFragmentArguments<GetWallets> {
public:
/// \brief Default constructor.
GetWallets();
Expand Down Expand Up @@ -89,12 +87,6 @@ template ENJINSDK_EXPORT project::GetWallets& AssetFragmentArguments<project::Ge

template ENJINSDK_EXPORT project::GetWallets& WalletFragmentArguments<project::GetWallets>::set_with_assets_created();

template ENJINSDK_EXPORT project::GetWallets&
PaginationArguments<project::GetWallets>::set_pagination(models::PaginationOptions pagination);

template ENJINSDK_EXPORT project::GetWallets&
PaginationArguments<project::GetWallets>::set_pagination(int page, int limit);

}

#endif //ENJINCPPSDK_PROJECTGETWALLETS_HPP
10 changes: 2 additions & 8 deletions src/graphql/templates/enjin/schemas/project/query/GetWallets.gql
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
#namespace enjin.sdk.project.GetWallets
#import enjin.sdk.shared.Wallet
#import enjin.sdk.shared.PaginationCursor

#arg userIds [String]
#arg ethAddresses [EthAddress]

query {
results: GetWallets(
result: GetWallets(
userIds: $userIds
ethAddresses: $ethAddresses
) {
items {
...Wallet
}
cursor {
...PaginationCursor
}
...Wallet
}
}
5 changes: 1 addition & 4 deletions src/schemas/project/queries/GetWallets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ GetWallets::GetWallets() : graphql::AbstractGraphqlRequest("enjin.sdk.project.Ge
std::string GetWallets::serialize() const {
rapidjson::Document document(rapidjson::kObjectType);
utils::join_serialized_objects_to_document(document, {
WalletFragmentArguments::serialize(),
PaginationArguments::serialize()
WalletFragmentArguments::serialize()
});

if (user_ids.has_value()) {
Expand Down Expand Up @@ -54,8 +53,6 @@ bool GetWallets::operator==(const GetWallets& rhs) const {
static_cast<const graphql::AbstractGraphqlRequest&>(rhs) &&
static_cast<const shared::WalletFragmentArguments<GetWallets>&>(*this) ==
static_cast<const shared::WalletFragmentArguments<GetWallets>&>(rhs) &&
static_cast<const shared::PaginationArguments<GetWallets>&>(*this) ==
static_cast<const shared::PaginationArguments<GetWallets>&>(rhs) &&
user_ids == rhs.user_ids &&
eth_addresses == rhs.eth_addresses;
}
Expand Down
3 changes: 0 additions & 3 deletions test/unit/schemas/project/queries/ProjectGetWalletsTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
*/

#include "JsonTestSuite.hpp"
#include "PaginationArgumentsTestSuite.hpp"
#include "WalletFragmentArgumentsTestSuite.hpp"
#include "enjinsdk/project/GetWallets.hpp"
#include "gtest/gtest.h"
Expand All @@ -25,7 +24,6 @@ using namespace enjin::sdk::project;
using namespace enjin::test::suites;

class ProjectGetWalletsTest : public WalletFragmentArgumentsTestSuite<GetWallets>,
public PaginationArgumentsTestSuite<GetWallets>,
public JsonTestSuite,
public testing::Test {
public:
Expand All @@ -39,7 +37,6 @@ class ProjectGetWalletsTest : public WalletFragmentArgumentsTestSuite<GetWallets
.set_user_ids(std::vector<std::string>())
.set_eth_addresses(std::vector<std::string>());
set_wallet_fragment_arguments(request);
set_pagination_arguments(request);
return request;
}
};
Expand Down

0 comments on commit 79312d9

Please sign in to comment.