File tree Expand file tree Collapse file tree 3 files changed +60
-3
lines changed
graphqlservice/introspection Expand file tree Collapse file tree 3 files changed +60
-3
lines changed Original file line number Diff line number Diff line change @@ -169,11 +169,11 @@ class ValidateVariableTypeVisitor
169169class ValidateExecutableVisitor
170170{
171171public:
172- ValidateExecutableVisitor (const std::shared_ptr<schema::Schema>& schema);
172+ GRAPHQLSERVICE_EXPORT ValidateExecutableVisitor (const std::shared_ptr<schema::Schema>& schema);
173173
174- void visit (const peg::ast_node& root);
174+ GRAPHQLSERVICE_EXPORT void visit (const peg::ast_node& root);
175175
176- std::list<schema_error> getStructuredErrors ();
176+ GRAPHQLSERVICE_EXPORT std::list<schema_error> getStructuredErrors ();
177177
178178private:
179179 static ValidateTypeFieldArguments getArguments (
Original file line number Diff line number Diff line change @@ -68,6 +68,22 @@ enum class DirectiveLocation
6868 INPUT_FIELD_DEFINITION
6969};
7070
71+ #ifdef GRAPHQL_DLLEXPORTS
72+ // Export all of the built-in converters
73+ template <>
74+ GRAPHQLSERVICE_EXPORT TypeKind service::ModifiedArgument<TypeKind>::convert(
75+ const response::Value& value);
76+ template <>
77+ GRAPHQLSERVICE_EXPORT std::future<service::ResolverResult> service::ModifiedResult<TypeKind>::convert(
78+ service::FieldResult<TypeKind>&& result, service::ResolverParams&& params);
79+ template <>
80+ GRAPHQLSERVICE_EXPORT DirectiveLocation service::ModifiedArgument<DirectiveLocation>::convert(
81+ const response::Value& value);
82+ template <>
83+ GRAPHQLSERVICE_EXPORT std::future<service::ResolverResult> service::ModifiedResult<DirectiveLocation>::convert(
84+ service::FieldResult<DirectiveLocation>&& result, service::ResolverParams&& params);
85+ #endif // GRAPHQL_DLLEXPORTS
86+
7187namespace object {
7288
7389class Schema ;
Original file line number Diff line number Diff line change @@ -1671,6 +1671,28 @@ static_assert(graphql::internal::MinorVersion == )cpp"
16711671 headerFile << R"cpp(
16721672};
16731673
1674+ )cpp" ;
1675+ }
1676+
1677+ if (_isIntrospection)
1678+ {
1679+ headerFile << R"cpp( #ifdef GRAPHQL_DLLEXPORTS
1680+ // Export all of the built-in converters
1681+ )cpp" ;
1682+
1683+ for (const auto & enumType : _enumTypes)
1684+ {
1685+ headerFile << R"cpp( template <>
1686+ GRAPHQLSERVICE_EXPORT )cpp" << enumType.cppType << R"cpp( service::ModifiedArgument<)cpp" << enumType.cppType << R"cpp( >::convert(
1687+ const response::Value& value);
1688+ template <>
1689+ GRAPHQLSERVICE_EXPORT std::future<service::ResolverResult> service::ModifiedResult<)cpp" << enumType.cppType << R"cpp( >::convert(
1690+ service::FieldResult<)cpp" << enumType.cppType << R"cpp( >&& result, service::ResolverParams&& params);
1691+ )cpp" ;
1692+ }
1693+
1694+ headerFile << R"cpp( #endif // GRAPHQL_DLLEXPORTS
1695+
16741696)cpp" ;
16751697 }
16761698 }
@@ -1704,6 +1726,25 @@ static_assert(graphql::internal::MinorVersion == )cpp"
17041726 }
17051727 headerFile << R"cpp( };
17061728
1729+ )cpp" ;
1730+ }
1731+
1732+ if (_isIntrospection)
1733+ {
1734+ headerFile << R"cpp( #ifdef GRAPHQL_DLLEXPORTS
1735+ // Export all of the built-in converters
1736+ )cpp" ;
1737+
1738+ for (const auto & inputType : _inputTypes)
1739+ {
1740+ headerFile << R"cpp( template <>
1741+ GRAPHQLSERVICE_EXPORT )cpp" << inputType.cppType << R"cpp( service::ModifiedArgument<)cpp" << inputType.cppType << R"cpp( >::convert(
1742+ const response::Value& value);
1743+ )cpp" ;
1744+ }
1745+
1746+ headerFile << R"cpp( #endif // GRAPHQL_DLLEXPORTS
1747+
17071748)cpp" ;
17081749 }
17091750 }
You can’t perform that action at this time.
0 commit comments