Skip to content

Remove the schemagen --merge-files option and make everything use separate files #177

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Dec 10, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Suppress Introspection implement and stub concepts
  • Loading branch information
wravery committed Dec 9, 2021
commit 044b7e095c2574d7cc4b62697fc8db2e44a583db
63 changes: 0 additions & 63 deletions include/graphqlservice/introspection/DirectiveObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,69 +11,6 @@
#include "IntrospectionSchema.h"

namespace graphql::introspection::object {
namespace methods::DirectiveHas {

template <class TImpl>
concept getNameWithParams = requires (TImpl impl, service::FieldParams params)
{
{ service::FieldResult<std::string> { impl.getName(std::move(params)) } };
};

template <class TImpl>
concept getName = requires (TImpl impl)
{
{ service::FieldResult<std::string> { impl.getName() } };
};

template <class TImpl>
concept getDescriptionWithParams = requires (TImpl impl, service::FieldParams params)
{
{ service::FieldResult<std::optional<std::string>> { impl.getDescription(std::move(params)) } };
};

template <class TImpl>
concept getDescription = requires (TImpl impl)
{
{ service::FieldResult<std::optional<std::string>> { impl.getDescription() } };
};

template <class TImpl>
concept getLocationsWithParams = requires (TImpl impl, service::FieldParams params)
{
{ service::FieldResult<std::vector<DirectiveLocation>> { impl.getLocations(std::move(params)) } };
};

template <class TImpl>
concept getLocations = requires (TImpl impl)
{
{ service::FieldResult<std::vector<DirectiveLocation>> { impl.getLocations() } };
};

template <class TImpl>
concept getArgsWithParams = requires (TImpl impl, service::FieldParams params)
{
{ service::FieldResult<std::vector<std::shared_ptr<InputValue>>> { impl.getArgs(std::move(params)) } };
};

template <class TImpl>
concept getArgs = requires (TImpl impl)
{
{ service::FieldResult<std::vector<std::shared_ptr<InputValue>>> { impl.getArgs() } };
};

template <class TImpl>
concept beginSelectionSet = requires (TImpl impl, const service::SelectionSetParams params)
{
{ impl.beginSelectionSet(params) };
};

template <class TImpl>
concept endSelectionSet = requires (TImpl impl, const service::SelectionSetParams params)
{
{ impl.endSelectionSet(params) };
};

} // namespace methods::DirectiveHas

class Directive
: public service::Object
Expand Down
63 changes: 0 additions & 63 deletions include/graphqlservice/introspection/EnumValueObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,69 +11,6 @@
#include "IntrospectionSchema.h"

namespace graphql::introspection::object {
namespace methods::EnumValueHas {

template <class TImpl>
concept getNameWithParams = requires (TImpl impl, service::FieldParams params)
{
{ service::FieldResult<std::string> { impl.getName(std::move(params)) } };
};

template <class TImpl>
concept getName = requires (TImpl impl)
{
{ service::FieldResult<std::string> { impl.getName() } };
};

template <class TImpl>
concept getDescriptionWithParams = requires (TImpl impl, service::FieldParams params)
{
{ service::FieldResult<std::optional<std::string>> { impl.getDescription(std::move(params)) } };
};

template <class TImpl>
concept getDescription = requires (TImpl impl)
{
{ service::FieldResult<std::optional<std::string>> { impl.getDescription() } };
};

template <class TImpl>
concept getIsDeprecatedWithParams = requires (TImpl impl, service::FieldParams params)
{
{ service::FieldResult<bool> { impl.getIsDeprecated(std::move(params)) } };
};

template <class TImpl>
concept getIsDeprecated = requires (TImpl impl)
{
{ service::FieldResult<bool> { impl.getIsDeprecated() } };
};

template <class TImpl>
concept getDeprecationReasonWithParams = requires (TImpl impl, service::FieldParams params)
{
{ service::FieldResult<std::optional<std::string>> { impl.getDeprecationReason(std::move(params)) } };
};

template <class TImpl>
concept getDeprecationReason = requires (TImpl impl)
{
{ service::FieldResult<std::optional<std::string>> { impl.getDeprecationReason() } };
};

template <class TImpl>
concept beginSelectionSet = requires (TImpl impl, const service::SelectionSetParams params)
{
{ impl.beginSelectionSet(params) };
};

template <class TImpl>
concept endSelectionSet = requires (TImpl impl, const service::SelectionSetParams params)
{
{ impl.endSelectionSet(params) };
};

} // namespace methods::EnumValueHas

class EnumValue
: public service::Object
Expand Down
87 changes: 0 additions & 87 deletions include/graphqlservice/introspection/FieldObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,93 +11,6 @@
#include "IntrospectionSchema.h"

namespace graphql::introspection::object {
namespace methods::FieldHas {

template <class TImpl>
concept getNameWithParams = requires (TImpl impl, service::FieldParams params)
{
{ service::FieldResult<std::string> { impl.getName(std::move(params)) } };
};

template <class TImpl>
concept getName = requires (TImpl impl)
{
{ service::FieldResult<std::string> { impl.getName() } };
};

template <class TImpl>
concept getDescriptionWithParams = requires (TImpl impl, service::FieldParams params)
{
{ service::FieldResult<std::optional<std::string>> { impl.getDescription(std::move(params)) } };
};

template <class TImpl>
concept getDescription = requires (TImpl impl)
{
{ service::FieldResult<std::optional<std::string>> { impl.getDescription() } };
};

template <class TImpl>
concept getArgsWithParams = requires (TImpl impl, service::FieldParams params)
{
{ service::FieldResult<std::vector<std::shared_ptr<InputValue>>> { impl.getArgs(std::move(params)) } };
};

template <class TImpl>
concept getArgs = requires (TImpl impl)
{
{ service::FieldResult<std::vector<std::shared_ptr<InputValue>>> { impl.getArgs() } };
};

template <class TImpl>
concept getTypeWithParams = requires (TImpl impl, service::FieldParams params)
{
{ service::FieldResult<std::shared_ptr<Type>> { impl.getType(std::move(params)) } };
};

template <class TImpl>
concept getType = requires (TImpl impl)
{
{ service::FieldResult<std::shared_ptr<Type>> { impl.getType() } };
};

template <class TImpl>
concept getIsDeprecatedWithParams = requires (TImpl impl, service::FieldParams params)
{
{ service::FieldResult<bool> { impl.getIsDeprecated(std::move(params)) } };
};

template <class TImpl>
concept getIsDeprecated = requires (TImpl impl)
{
{ service::FieldResult<bool> { impl.getIsDeprecated() } };
};

template <class TImpl>
concept getDeprecationReasonWithParams = requires (TImpl impl, service::FieldParams params)
{
{ service::FieldResult<std::optional<std::string>> { impl.getDeprecationReason(std::move(params)) } };
};

template <class TImpl>
concept getDeprecationReason = requires (TImpl impl)
{
{ service::FieldResult<std::optional<std::string>> { impl.getDeprecationReason() } };
};

template <class TImpl>
concept beginSelectionSet = requires (TImpl impl, const service::SelectionSetParams params)
{
{ impl.beginSelectionSet(params) };
};

template <class TImpl>
concept endSelectionSet = requires (TImpl impl, const service::SelectionSetParams params)
{
{ impl.endSelectionSet(params) };
};

} // namespace methods::FieldHas

class Field
: public service::Object
Expand Down
63 changes: 0 additions & 63 deletions include/graphqlservice/introspection/InputValueObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,69 +11,6 @@
#include "IntrospectionSchema.h"

namespace graphql::introspection::object {
namespace methods::InputValueHas {

template <class TImpl>
concept getNameWithParams = requires (TImpl impl, service::FieldParams params)
{
{ service::FieldResult<std::string> { impl.getName(std::move(params)) } };
};

template <class TImpl>
concept getName = requires (TImpl impl)
{
{ service::FieldResult<std::string> { impl.getName() } };
};

template <class TImpl>
concept getDescriptionWithParams = requires (TImpl impl, service::FieldParams params)
{
{ service::FieldResult<std::optional<std::string>> { impl.getDescription(std::move(params)) } };
};

template <class TImpl>
concept getDescription = requires (TImpl impl)
{
{ service::FieldResult<std::optional<std::string>> { impl.getDescription() } };
};

template <class TImpl>
concept getTypeWithParams = requires (TImpl impl, service::FieldParams params)
{
{ service::FieldResult<std::shared_ptr<Type>> { impl.getType(std::move(params)) } };
};

template <class TImpl>
concept getType = requires (TImpl impl)
{
{ service::FieldResult<std::shared_ptr<Type>> { impl.getType() } };
};

template <class TImpl>
concept getDefaultValueWithParams = requires (TImpl impl, service::FieldParams params)
{
{ service::FieldResult<std::optional<std::string>> { impl.getDefaultValue(std::move(params)) } };
};

template <class TImpl>
concept getDefaultValue = requires (TImpl impl)
{
{ service::FieldResult<std::optional<std::string>> { impl.getDefaultValue() } };
};

template <class TImpl>
concept beginSelectionSet = requires (TImpl impl, const service::SelectionSetParams params)
{
{ impl.beginSelectionSet(params) };
};

template <class TImpl>
concept endSelectionSet = requires (TImpl impl, const service::SelectionSetParams params)
{
{ impl.endSelectionSet(params) };
};

} // namespace methods::InputValueHas

class InputValue
: public service::Object
Expand Down
75 changes: 0 additions & 75 deletions include/graphqlservice/introspection/SchemaObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,81 +11,6 @@
#include "IntrospectionSchema.h"

namespace graphql::introspection::object {
namespace methods::SchemaHas {

template <class TImpl>
concept getTypesWithParams = requires (TImpl impl, service::FieldParams params)
{
{ service::FieldResult<std::vector<std::shared_ptr<Type>>> { impl.getTypes(std::move(params)) } };
};

template <class TImpl>
concept getTypes = requires (TImpl impl)
{
{ service::FieldResult<std::vector<std::shared_ptr<Type>>> { impl.getTypes() } };
};

template <class TImpl>
concept getQueryTypeWithParams = requires (TImpl impl, service::FieldParams params)
{
{ service::FieldResult<std::shared_ptr<Type>> { impl.getQueryType(std::move(params)) } };
};

template <class TImpl>
concept getQueryType = requires (TImpl impl)
{
{ service::FieldResult<std::shared_ptr<Type>> { impl.getQueryType() } };
};

template <class TImpl>
concept getMutationTypeWithParams = requires (TImpl impl, service::FieldParams params)
{
{ service::FieldResult<std::shared_ptr<Type>> { impl.getMutationType(std::move(params)) } };
};

template <class TImpl>
concept getMutationType = requires (TImpl impl)
{
{ service::FieldResult<std::shared_ptr<Type>> { impl.getMutationType() } };
};

template <class TImpl>
concept getSubscriptionTypeWithParams = requires (TImpl impl, service::FieldParams params)
{
{ service::FieldResult<std::shared_ptr<Type>> { impl.getSubscriptionType(std::move(params)) } };
};

template <class TImpl>
concept getSubscriptionType = requires (TImpl impl)
{
{ service::FieldResult<std::shared_ptr<Type>> { impl.getSubscriptionType() } };
};

template <class TImpl>
concept getDirectivesWithParams = requires (TImpl impl, service::FieldParams params)
{
{ service::FieldResult<std::vector<std::shared_ptr<Directive>>> { impl.getDirectives(std::move(params)) } };
};

template <class TImpl>
concept getDirectives = requires (TImpl impl)
{
{ service::FieldResult<std::vector<std::shared_ptr<Directive>>> { impl.getDirectives() } };
};

template <class TImpl>
concept beginSelectionSet = requires (TImpl impl, const service::SelectionSetParams params)
{
{ impl.beginSelectionSet(params) };
};

template <class TImpl>
concept endSelectionSet = requires (TImpl impl, const service::SelectionSetParams params)
{
{ impl.endSelectionSet(params) };
};

} // namespace methods::SchemaHas

class Schema
: public service::Object
Expand Down
Loading