Skip to content

Commit

Permalink
fix(fmt): cleanup extra blank line in client module interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
wravery committed Sep 16, 2024
1 parent b57272f commit 8bd97b6
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 17 deletions.
1 change: 0 additions & 1 deletion samples/client/benchmark/BenchmarkClient.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export module GraphQL.Benchmark.BenchmarkClient;

export namespace graphql::client {


namespace benchmark {

using benchmark::GetRequestText;
Expand Down
1 change: 0 additions & 1 deletion samples/client/multiple/MultipleQueriesClient.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export module GraphQL.MultipleQueries.MultipleQueriesClient;

export namespace graphql::client {


namespace multiple {

using multiple::GetRequestText;
Expand Down
1 change: 0 additions & 1 deletion samples/client/mutate/MutateClient.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export module GraphQL.Mutate.MutateClient;

export namespace graphql::client {


namespace mutate {

using mutate::GetRequestText;
Expand Down
1 change: 0 additions & 1 deletion samples/client/nestedinput/NestedInputClient.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export module GraphQL.NestedInput.NestedInputClient;

export namespace graphql::client {


namespace nestedinput {

using nestedinput::GetRequestText;
Expand Down
1 change: 0 additions & 1 deletion samples/client/query/QueryClient.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export module GraphQL.Query.QueryClient;

export namespace graphql::client {


namespace query {

using query::GetRequestText;
Expand Down
1 change: 0 additions & 1 deletion samples/client/subscribe/SubscribeClient.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export module GraphQL.Subscribe.SubscribeClient;

export namespace graphql::client {


namespace subscribe {

using subscribe::GetRequestText;
Expand Down
1 change: 0 additions & 1 deletion samples/proxy/query/ProxyClient.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export module GraphQL.Proxy.ProxyClient;

export namespace graphql::client {


namespace proxy {

using proxy::GetRequestText;
Expand Down
16 changes: 6 additions & 10 deletions src/ClientGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -643,20 +643,15 @@ export )cpp";

moduleFile << std::endl;

NamespaceScope schemaNamespace { moduleFile, _schemaLoader.getSchemaNamespace(), true };
NamespaceScope schemaNamespace { moduleFile, _schemaLoader.getSchemaNamespace() };
PendingBlankLine pendingSeparator { moduleFile };

pendingSeparator.reset();
if (schemaNamespace.enter())
{
moduleFile << R"cpp(
moduleFile << R"cpp(
using )cpp" << _schemaLoader.getSchemaNamespace()
<< R"cpp(::GetRequestText;
<< R"cpp(::GetRequestText;
using )cpp" << _schemaLoader.getSchemaNamespace()
<< R"cpp(::GetRequestObject;
<< R"cpp(::GetRequestObject;
)cpp";
pendingSeparator.add();
}

const auto& operations = _requestLoader.getOperations();
std::unordered_set<std::string_view> declaredEnum;
Expand Down Expand Up @@ -1065,7 +1060,8 @@ response::Value Variable<)cpp"

sourceFile << R"cpp(template <>
response::Value Variable<)cpp"
<< cppType << R"cpp(>::serialize()cpp" << cppType << R"cpp(&& inputValue)
<< cppType << R"cpp(>::serialize()cpp" << cppType
<< R"cpp(&& inputValue)
{
response::Value result { response::Type::Map };
Expand Down

0 comments on commit 8bd97b6

Please sign in to comment.