diff --git a/include/graphqlservice/GraphQLService.h b/include/graphqlservice/GraphQLService.h index ebd026a1..4c020298 100644 --- a/include/graphqlservice/GraphQLService.h +++ b/include/graphqlservice/GraphQLService.h @@ -663,9 +663,11 @@ struct ModifiedArgument // Peel off the none modifier. If it's included, it should always be last in the list. template - static typename std::enable_if_t - require(std::string_view name, const response::Value& arguments) + static typename std::enable_if_t require( + std::string_view name, const response::Value& arguments) { + static_assert(sizeof...(Other) == 0, "None modifier should always be last"); + // Just call through to the non-template method without the modifiers. return require(name, arguments); } diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7e594f3e..abd456f6 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -452,6 +452,7 @@ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../include/graphqlservice/internal/Awaitable.h ${CMAKE_CURRENT_SOURCE_DIR}/../include/graphqlservice/internal/Base64.h ${CMAKE_CURRENT_SOURCE_DIR}/../include/graphqlservice/internal/Grammar.h + ${CMAKE_CURRENT_SOURCE_DIR}/../include/graphqlservice/internal/Introspection.h ${CMAKE_CURRENT_SOURCE_DIR}/../include/graphqlservice/internal/Schema.h ${CMAKE_CURRENT_SOURCE_DIR}/../include/graphqlservice/internal/SortedMap.h ${CMAKE_CURRENT_SOURCE_DIR}/../include/graphqlservice/internal/SyntaxTree.h diff --git a/src/SchemaGenerator.cpp b/src/SchemaGenerator.cpp index 492a736c..580fe487 100644 --- a/src/SchemaGenerator.cpp +++ b/src/SchemaGenerator.cpp @@ -2874,7 +2874,7 @@ using namespace std::literals; if (!_loader.isIntrospection()) { - if (!objectType.interfaces.empty()) + if (!objectType.interfaces.empty() || !objectType.unions.empty()) { NamespaceScope implementsNamespace { headerFile, R"cpp(implements)cpp" };