Error Configuring GraphQL Subscriptions in ASP.NET Core

Error Configuring GraphQL Subscriptions in ASP.NET Core


1

I am encountering an issue while configuring GraphQL subscriptions in my ASP.NET Core web api. I have followed the documentation and examples, but I’m receiving an error that I can’t seem to resolve.

app.UseWebSockets();

app.UseGraphQLWebSockets<GraphQLSchema>("/graphql");

app.UseGraphQL<GraphQLSchema>();
Severity    Code    Description Project File    Line    Suppression State
Error   CS0012  The type 'ISchema' is defined in an assembly that is not referenced. You must add a reference to assembly 'GraphQL, Version=3.2.0.0, Culture=neutral, PublicKeyToken=null'.
Severity    Code    Description Project File    Line    Suppression State
Error   CS0311  The type 'PermissionAPI.GraphQL.GraphQLSchema' cannot be used as type parameter 'TSchema' in the generic type or method 'GraphQLWebSocketsExtensions.UseGraphQLWebSockets<TSchema>(IApplicationBuilder, string)'. There is no implicit reference conversion from 'PermissionAPI.GraphQL.GraphQLSchema' to 'GraphQL.Types.ISchema'.

Im using

  • GraphQL (7.6.1)
  • GraphQL.Server.Transport.AspNetCore (7.6.0)
  • GraphQL.Server.Transport.WebSockets (4.4.1)

Tried to downgrade GraphQL but it caused more errors.


Load 4 more related questions


Show fewer related questions

0



Leave a Reply

Your email address will not be published. Required fields are marked *