Skip to content
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

GraphQL schema creation fails #17267

Open
gvkries opened this issue Dec 20, 2024 · 5 comments
Open

GraphQL schema creation fails #17267

gvkries opened this issue Dec 20, 2024 · 5 comments
Labels
Milestone

Comments

@gvkries
Copy link
Contributor

gvkries commented Dec 20, 2024

While researching issue #17261 I came across another issue in the latest main. If you have a part with fields, the GraphQL schema generation will fail with an InvalidOperationException, if SQL indexing is enabled.

System.InvalidOperationException
  HResult=0x80131509
  Message=DynamicPartWhereInputGraphType is not a valid ScalarGraphType.
  Source=OrchardCore.Apis.GraphQL.Abstractions
  StackTrace:
   at OrchardCore.Apis.GraphQL.Queries.WhereInputObjectGraphType`1.CreateGraphType(Type type) in C:\src\OrchardCore\OrchardCore.Apis.GraphQL.Abstractions\Queries\WhereInputObjectGraphType.cs:line 171
   at OrchardCore.Apis.GraphQL.Queries.WhereInputObjectGraphType`1.AddEqualityFilters(Type graphType, String fieldName, String description) in C:\src\OrchardCore\OrchardCore.Apis.GraphQL.Abstractions\Queries\WhereInputObjectGraphType.cs:line 102
   at OrchardCore.Apis.GraphQL.Queries.WhereInputObjectGraphType`1.AddScalarFilterFields(Type graphType, String fieldName, String description) in C:\src\OrchardCore\OrchardCore.Apis.GraphQL.Abstractions\Queries\WhereInputObjectGraphType.cs:line 78
   at OrchardCore.ContentManagement.GraphQL.Queries.Types.ContentItemWhereInput.AddScalarFilterFields(Type graphType, String fieldName, String description) in C:\src\OrchardCore\OrchardCore.ContentManagement.GraphQL\Queries\Types\ContentItemWhereInput.cs:line 54
   at OrchardCore.ContentManagement.GraphQL.Queries.Types.DynamicContentTypeBuilder.BuildInternal(ISchema schema, ContentTypeDefinition contentTypeDefinition, IComplexGraphType graphType) in C:\src\OrchardCore\OrchardCore.ContentManagement.GraphQL\Queries\Types\DynamicContentTypeBuilder.cs:line 156
   at OrchardCore.ContentManagement.GraphQL.Queries.Types.DynamicContentTypeWhereInputBuilder.Build(ISchema schema, FieldType contentQuery, ContentTypeDefinition contentTypeDefinition, ContentItemType contentItemType) in C:\src\OrchardCore\OrchardCore.ContentManagement.GraphQL\Queries\Types\DynamicContentTypeWhereInputBuilder.cs:line 24
   at OrchardCore.ContentManagement.GraphQL.Queries.ContentTypeQuery.<BuildAsync>d__6.MoveNext() in C:\src\OrchardCore\OrchardCore.ContentManagement.GraphQL\Queries\ContentTypeQuery.cs:line 74
   at OrchardCore.Apis.GraphQL.Services.SchemaService.<GetSchemaAsync>d__6.MoveNext() in C:\src\OrchardCore.Modules\OrchardCore.Apis.GraphQL\Services\SchemaService.cs:line 96
   at OrchardCore.Apis.GraphQL.GraphQLMiddleware.<ExecuteAsync>d__11.MoveNext() in C:\src\OrchardCore.Modules\OrchardCore.Apis.GraphQL\GraphQLMiddleware.cs:line 144
   at OrchardCore.Apis.GraphQL.GraphQLMiddleware.<InvokeAsync>d__9.MoveNext() 

[...]

Orchard Core version

Latest main, seems to be related to upgrading GraphQL (#16736).

To Reproduce

  1. Enable SQL indexing for fields.
  2. Create a part type with fields and attach it to a content type that is included in the GraphQL schema.
  3. Schema generation fails e.g. in GraphiQL.
@gvkries
Copy link
Contributor Author

gvkries commented Dec 20, 2024

/cc @MikeAlhayek

Copy link
Contributor

github-actions bot commented Jan 2, 2025

We triaged this issue and set the milestone according to the priority we think is appropriate (see the docs on how we triage and prioritize issues).

This indicates when the core team may start working on it. However, if you'd like to contribute, we'd warmly welcome you to do that anytime. See our guide on contributions here.

@sebastienros sebastienros modified the milestones: 2.x, 3.0, 3.x Jan 2, 2025
Copy link
Contributor

github-actions bot commented Jan 2, 2025

We triaged this issue and set the milestone according to the priority we think is appropriate (see the docs on how we triage and prioritize issues).

This indicates when the core team may start working on it. However, if you'd like to contribute, we'd warmly welcome you to do that anytime. See our guide on contributions here.

1 similar comment
Copy link
Contributor

github-actions bot commented Jan 2, 2025

We triaged this issue and set the milestone according to the priority we think is appropriate (see the docs on how we triage and prioritize issues).

This indicates when the core team may start working on it. However, if you'd like to contribute, we'd warmly welcome you to do that anytime. See our guide on contributions here.

@sebastienros sebastienros modified the milestones: 3.x, 3.0 Jan 2, 2025
Copy link
Contributor

github-actions bot commented Jan 2, 2025

We triaged this issue and set the milestone according to the priority we think is appropriate (see the docs on how we triage and prioritize issues).

This indicates when the core team may start working on it. However, if you'd like to contribute, we'd warmly welcome you to do that anytime. See our guide on contributions here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants