Skip to content

Commit 99fbc63

Browse files
authored
Merge pull request #197 from wravery/merge-libs
Merge graphintrospection lib back into graphqlservice
2 parents bd693e0 + 0ee82c8 commit 99fbc63

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+159
-289
lines changed

cmake/Version.h.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
#pragma once
55

6-
#ifndef VERSION_H
7-
#define VERSION_H
6+
#ifndef GRAPHQLVERSION_H
7+
#define GRAPHQLVERSION_H
88

99
#include <string_view>
1010

@@ -18,4 +18,4 @@ constexpr size_t PatchVersion = @PROJECT_VERSION_PATCH@;
1818

1919
} // namespace graphql::internal
2020

21-
#endif // VERSION_H
21+
#endif // GRAPHQLVERSION_H

cmake/cppgraphqlgen-config.cmake

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ The following import targets are created:
1212
cppgraphqlgen::graphqlpeg
1313
cppgraphqlgen::graphqlresponse
1414
cppgraphqlgen::graphqlservice
15-
cppgraphqlgen::graphqlintrospection
1615
cppgraphqlgen::graphqljson
16+
cppgraphqlgen::graphqlclient
1717
cppgraphqlgen::schemagen
1818
cppgraphqlgen::clientgen
1919
@@ -23,7 +23,6 @@ The following functions are defined to help with code generation and build targe
2323
2424
update_graphql_schema_files
2525
add_graphql_schema_target
26-
add_graphql_schema_no_introspection_target
2726
update_graphql_client_files
2827
add_graphql_client_target
2928
#]=======================================================================]

cmake/cppgraphqlgen-functions.cmake

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -47,20 +47,7 @@ function(add_graphql_schema_target SCHEMA_TARGET)
4747
add_library(${SCHEMA_TARGET}_schema STATIC ${SCHEMA_FILES})
4848
add_dependencies(${SCHEMA_TARGET}_schema ${SCHEMA_TARGET}_update_schema)
4949
target_include_directories(${SCHEMA_TARGET}_schema PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
50-
target_link_libraries(${SCHEMA_TARGET}_schema PUBLIC cppgraphqlgen::graphqlintrospection)
51-
endif()
52-
endfunction()
53-
54-
function(add_graphql_schema_no_introspection_target SCHEMA_NO_INTROSPECTION_TARGET)
55-
add_custom_target(${SCHEMA_NO_INTROSPECTION_TARGET}_update_schema ALL
56-
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${SCHEMA_NO_INTROSPECTION_TARGET}_schema_files)
57-
58-
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${SCHEMA_NO_INTROSPECTION_TARGET}_schema_files)
59-
file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/${SCHEMA_NO_INTROSPECTION_TARGET}_schema_files SCHEMA_FILES)
60-
add_library(${SCHEMA_NO_INTROSPECTION_TARGET}_schema STATIC ${SCHEMA_FILES})
61-
add_dependencies(${SCHEMA_NO_INTROSPECTION_TARGET}_schema ${SCHEMA_NO_INTROSPECTION_TARGET}_update_schema)
62-
target_include_directories(${SCHEMA_NO_INTROSPECTION_TARGET}_schema PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
63-
target_link_libraries(${SCHEMA_NO_INTROSPECTION_TARGET}_schema PUBLIC cppgraphqlgen::graphqlservice)
50+
target_link_libraries(${SCHEMA_TARGET}_schema PUBLIC cppgraphqlgen::graphqlservice)
6451
endif()
6552
endfunction()
6653

cmake/version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.0.1
1+
4.1.0

include/graphqlservice/internal/Awaitable.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
#pragma once
55

6-
#ifndef Awaitable_H
7-
#define Awaitable_H
6+
#ifndef GRAPHQLAWAITABLE_H
7+
#define GRAPHQLAWAITABLE_H
88

99
// clang-format off
1010
#ifdef USE_STD_EXPERIMENTAL_COROUTINE
@@ -159,4 +159,4 @@ class Awaitable
159159

160160
} // namespace graphql::internal
161161

162-
#endif // Awaitable_H
162+
#endif // GRAPHQLAWAITABLE_H

include/graphqlservice/internal/Base64.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
#pragma once
55

6-
#ifndef BASE64_H
7-
#define BASE64_H
6+
#ifndef GRAPHQLBASE64_H
7+
#define GRAPHQLBASE64_H
88

99
// clang-format off
1010
#ifdef GRAPHQL_DLLEXPORTS
@@ -68,4 +68,4 @@ class Base64
6868

6969
} // namespace graphql::internal
7070

71-
#endif // BASE64_H
71+
#endif // GRAPHQLBASE64_H

include/graphqlservice/internal/Introspection.h

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ class EnumValue;
2222
class Schema
2323
{
2424
public:
25-
GRAPHQLINTROSPECTION_EXPORT explicit Schema(const std::shared_ptr<schema::Schema>& schema);
25+
GRAPHQLSERVICE_EXPORT explicit Schema(const std::shared_ptr<schema::Schema>& schema);
2626

2727
// Accessors
28-
GRAPHQLINTROSPECTION_EXPORT std::optional<std::string> getDescription() const;
29-
GRAPHQLINTROSPECTION_EXPORT std::vector<std::shared_ptr<object::Type>> getTypes() const;
30-
GRAPHQLINTROSPECTION_EXPORT std::shared_ptr<object::Type> getQueryType() const;
31-
GRAPHQLINTROSPECTION_EXPORT std::shared_ptr<object::Type> getMutationType() const;
32-
GRAPHQLINTROSPECTION_EXPORT std::shared_ptr<object::Type> getSubscriptionType() const;
33-
GRAPHQLINTROSPECTION_EXPORT std::vector<std::shared_ptr<object::Directive>> getDirectives()
28+
GRAPHQLSERVICE_EXPORT std::optional<std::string> getDescription() const;
29+
GRAPHQLSERVICE_EXPORT std::vector<std::shared_ptr<object::Type>> getTypes() const;
30+
GRAPHQLSERVICE_EXPORT std::shared_ptr<object::Type> getQueryType() const;
31+
GRAPHQLSERVICE_EXPORT std::shared_ptr<object::Type> getMutationType() const;
32+
GRAPHQLSERVICE_EXPORT std::shared_ptr<object::Type> getSubscriptionType() const;
33+
GRAPHQLSERVICE_EXPORT std::vector<std::shared_ptr<object::Directive>> getDirectives()
3434
const;
3535

3636
private:
@@ -40,24 +40,24 @@ class Schema
4040
class Type
4141
{
4242
public:
43-
GRAPHQLINTROSPECTION_EXPORT explicit Type(const std::shared_ptr<const schema::BaseType>& type);
43+
GRAPHQLSERVICE_EXPORT explicit Type(const std::shared_ptr<const schema::BaseType>& type);
4444

4545
// Accessors
46-
GRAPHQLINTROSPECTION_EXPORT TypeKind getKind() const;
47-
GRAPHQLINTROSPECTION_EXPORT std::optional<std::string> getName() const;
48-
GRAPHQLINTROSPECTION_EXPORT std::optional<std::string> getDescription() const;
49-
GRAPHQLINTROSPECTION_EXPORT std::optional<std::vector<std::shared_ptr<object::Field>>>
46+
GRAPHQLSERVICE_EXPORT TypeKind getKind() const;
47+
GRAPHQLSERVICE_EXPORT std::optional<std::string> getName() const;
48+
GRAPHQLSERVICE_EXPORT std::optional<std::string> getDescription() const;
49+
GRAPHQLSERVICE_EXPORT std::optional<std::vector<std::shared_ptr<object::Field>>>
5050
getFields(std::optional<bool>&& includeDeprecatedArg) const;
51-
GRAPHQLINTROSPECTION_EXPORT std::optional<std::vector<std::shared_ptr<object::Type>>>
51+
GRAPHQLSERVICE_EXPORT std::optional<std::vector<std::shared_ptr<object::Type>>>
5252
getInterfaces() const;
53-
GRAPHQLINTROSPECTION_EXPORT std::optional<std::vector<std::shared_ptr<object::Type>>>
53+
GRAPHQLSERVICE_EXPORT std::optional<std::vector<std::shared_ptr<object::Type>>>
5454
getPossibleTypes() const;
55-
GRAPHQLINTROSPECTION_EXPORT std::optional<std::vector<std::shared_ptr<object::EnumValue>>>
55+
GRAPHQLSERVICE_EXPORT std::optional<std::vector<std::shared_ptr<object::EnumValue>>>
5656
getEnumValues(std::optional<bool>&& includeDeprecatedArg) const;
57-
GRAPHQLINTROSPECTION_EXPORT std::optional<std::vector<std::shared_ptr<object::InputValue>>>
57+
GRAPHQLSERVICE_EXPORT std::optional<std::vector<std::shared_ptr<object::InputValue>>>
5858
getInputFields() const;
59-
GRAPHQLINTROSPECTION_EXPORT std::shared_ptr<object::Type> getOfType() const;
60-
GRAPHQLINTROSPECTION_EXPORT std::optional<std::string> getSpecifiedByURL() const;
59+
GRAPHQLSERVICE_EXPORT std::shared_ptr<object::Type> getOfType() const;
60+
GRAPHQLSERVICE_EXPORT std::optional<std::string> getSpecifiedByURL() const;
6161

6262
private:
6363
const std::shared_ptr<const schema::BaseType> _type;
@@ -66,15 +66,15 @@ class Type
6666
class Field
6767
{
6868
public:
69-
GRAPHQLINTROSPECTION_EXPORT explicit Field(const std::shared_ptr<const schema::Field>& field);
69+
GRAPHQLSERVICE_EXPORT explicit Field(const std::shared_ptr<const schema::Field>& field);
7070

7171
// Accessors
72-
GRAPHQLINTROSPECTION_EXPORT std::string getName() const;
73-
GRAPHQLINTROSPECTION_EXPORT std::optional<std::string> getDescription() const;
74-
GRAPHQLINTROSPECTION_EXPORT std::vector<std::shared_ptr<object::InputValue>> getArgs() const;
75-
GRAPHQLINTROSPECTION_EXPORT std::shared_ptr<object::Type> getType() const;
76-
GRAPHQLINTROSPECTION_EXPORT bool getIsDeprecated() const;
77-
GRAPHQLINTROSPECTION_EXPORT std::optional<std::string> getDeprecationReason() const;
72+
GRAPHQLSERVICE_EXPORT std::string getName() const;
73+
GRAPHQLSERVICE_EXPORT std::optional<std::string> getDescription() const;
74+
GRAPHQLSERVICE_EXPORT std::vector<std::shared_ptr<object::InputValue>> getArgs() const;
75+
GRAPHQLSERVICE_EXPORT std::shared_ptr<object::Type> getType() const;
76+
GRAPHQLSERVICE_EXPORT bool getIsDeprecated() const;
77+
GRAPHQLSERVICE_EXPORT std::optional<std::string> getDeprecationReason() const;
7878

7979
private:
8080
const std::shared_ptr<const schema::Field> _field;
@@ -83,14 +83,14 @@ class Field
8383
class InputValue
8484
{
8585
public:
86-
GRAPHQLINTROSPECTION_EXPORT explicit InputValue(
86+
GRAPHQLSERVICE_EXPORT explicit InputValue(
8787
const std::shared_ptr<const schema::InputValue>& inputValue);
8888

8989
// Accessors
90-
GRAPHQLINTROSPECTION_EXPORT std::string getName() const;
91-
GRAPHQLINTROSPECTION_EXPORT std::optional<std::string> getDescription() const;
92-
GRAPHQLINTROSPECTION_EXPORT std::shared_ptr<object::Type> getType() const;
93-
GRAPHQLINTROSPECTION_EXPORT std::optional<std::string> getDefaultValue() const;
90+
GRAPHQLSERVICE_EXPORT std::string getName() const;
91+
GRAPHQLSERVICE_EXPORT std::optional<std::string> getDescription() const;
92+
GRAPHQLSERVICE_EXPORT std::shared_ptr<object::Type> getType() const;
93+
GRAPHQLSERVICE_EXPORT std::optional<std::string> getDefaultValue() const;
9494

9595
private:
9696
const std::shared_ptr<const schema::InputValue> _inputValue;
@@ -99,14 +99,14 @@ class InputValue
9999
class EnumValue
100100
{
101101
public:
102-
GRAPHQLINTROSPECTION_EXPORT explicit EnumValue(
102+
GRAPHQLSERVICE_EXPORT explicit EnumValue(
103103
const std::shared_ptr<const schema::EnumValue>& enumValue);
104104

105105
// Accessors
106-
GRAPHQLINTROSPECTION_EXPORT std::string getName() const;
107-
GRAPHQLINTROSPECTION_EXPORT std::optional<std::string> getDescription() const;
108-
GRAPHQLINTROSPECTION_EXPORT bool getIsDeprecated() const;
109-
GRAPHQLINTROSPECTION_EXPORT std::optional<std::string> getDeprecationReason() const;
106+
GRAPHQLSERVICE_EXPORT std::string getName() const;
107+
GRAPHQLSERVICE_EXPORT std::optional<std::string> getDescription() const;
108+
GRAPHQLSERVICE_EXPORT bool getIsDeprecated() const;
109+
GRAPHQLSERVICE_EXPORT std::optional<std::string> getDeprecationReason() const;
110110

111111
private:
112112
const std::shared_ptr<const schema::EnumValue> _enumValue;
@@ -115,15 +115,15 @@ class EnumValue
115115
class Directive
116116
{
117117
public:
118-
GRAPHQLINTROSPECTION_EXPORT explicit Directive(
118+
GRAPHQLSERVICE_EXPORT explicit Directive(
119119
const std::shared_ptr<const schema::Directive>& directive);
120120

121121
// Accessors
122-
GRAPHQLINTROSPECTION_EXPORT std::string getName() const;
123-
GRAPHQLINTROSPECTION_EXPORT std::optional<std::string> getDescription() const;
124-
GRAPHQLINTROSPECTION_EXPORT std::vector<DirectiveLocation> getLocations() const;
125-
GRAPHQLINTROSPECTION_EXPORT std::vector<std::shared_ptr<object::InputValue>> getArgs() const;
126-
GRAPHQLINTROSPECTION_EXPORT bool getIsRepeatable() const;
122+
GRAPHQLSERVICE_EXPORT std::string getName() const;
123+
GRAPHQLSERVICE_EXPORT std::optional<std::string> getDescription() const;
124+
GRAPHQLSERVICE_EXPORT std::vector<DirectiveLocation> getLocations() const;
125+
GRAPHQLSERVICE_EXPORT std::vector<std::shared_ptr<object::InputValue>> getArgs() const;
126+
GRAPHQLSERVICE_EXPORT bool getIsRepeatable() const;
127127

128128
private:
129129
const std::shared_ptr<const schema::Directive> _directive;

include/graphqlservice/internal/SortedMap.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
#pragma once
55

6-
#ifndef SORTEDMAP_H
7-
#define SORTEDMAP_H
6+
#ifndef GRAPHQLSORTEDMAP_H
7+
#define GRAPHQLSORTEDMAP_H
88

99
#include <algorithm>
1010
#include <functional>
@@ -363,4 +363,4 @@ using string_view_set = sorted_set<std::string_view, shorter_or_less>;
363363

364364
} // namespace graphql::internal
365365

366-
#endif // SORTEDMAP_H
366+
#endif // GRAPHQLSORTEDMAP_H

include/graphqlservice/internal/SyntaxTree.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
#pragma once
55

6-
#ifndef GRAPHQLTREE_H
7-
#define GRAPHQLTREE_H
6+
#ifndef GRAPHQLSYNTAXTREE_H
7+
#define GRAPHQLSYNTAXTREE_H
88

99
#include "graphqlservice/GraphQLParse.h"
1010

@@ -153,4 +153,4 @@ struct ast_input
153153

154154
} // namespace graphql::peg
155155

156-
#endif // GRAPHQLTREE_H
156+
#endif // GRAPHQLSYNTAXTREE_H

include/graphqlservice/internal/Version.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@
33

44
#pragma once
55

6-
#ifndef VERSION_H
7-
#define VERSION_H
6+
#ifndef GRAPHQLVERSION_H
7+
#define GRAPHQLVERSION_H
88

99
#include <string_view>
1010

1111
namespace graphql::internal {
1212

13-
constexpr std::string_view FullVersion { "4.0.1" };
13+
constexpr std::string_view FullVersion { "4.1.0" };
1414

1515
constexpr size_t MajorVersion = 4;
16-
constexpr size_t MinorVersion = 0;
17-
constexpr size_t PatchVersion = 1;
16+
constexpr size_t MinorVersion = 1;
17+
constexpr size_t PatchVersion = 0;
1818

1919
} // namespace graphql::internal
2020

21-
#endif // VERSION_H
21+
#endif // GRAPHQLVERSION_H

0 commit comments

Comments
 (0)