Skip to content

Conversation

@gao-artur
Copy link
Contributor

Consider the following schema

type Device {
  enabled: Toggle
  name: String
}

enum Toggle {
  DISABLED
  ENABLED
}

type Query {
  devices(isEnabled: Toggle): [Device!]!
}

And the following query

var queryBuilder = new QueryQueryBuilder()
    .WithParameter(new GraphQlQueryParameter<Toggle?>("isEnabled"))
    .WithDevices(new DeviceQueryBuilder()
            .WithName()
            .WithEnabled(),
        new GraphQlQueryParameter<Toggle?>("isEnabled"));

This throws exception

System.ArgumentException: value required (Parameter 'graphQlTypeName')
    at SampleServer.GeneratedGraphqlClient.QueryBuilderParameter`1.EnsureGraphQlTypeName(String graphQlTypeName) in C:\SampleServer.Tests\GeneratedGraphqlClient.cs:line 454
   at SampleServer.GeneratedGraphqlClient.QueryBuilderParameter`1..ctor(String name, String graphQlTypeName) in C:\SampleServer.Tests\GeneratedGraphqlClient.cs:line 438
   at SampleServer.GeneratedGraphqlClient.GraphQlQueryParameter`1..ctor(String name, String graphQlTypeName) in C:\SampleServer.Tests\GeneratedGraphqlClient.cs:line 472
   at SampleServer.Tests.Tests.Test() in C:\SampleServer.Tests\Tests.cs:line 15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant