commercetools / commercetools-dotnet-core-sdk-v2

https://commercetools.github.io/commercetools-dotnet-core-sdk-v2/docs/html/index.html
Apache License 2.0
17 stars 12 forks source link

Missing commercetools.Sdk.GraphQL.Api #330

Closed wehnertb closed 3 months ago

wehnertb commented 3 months ago

Describe the bug I'm trying to convert my code from using "magic strings" of GQL queries to the new SDK

https://commercetools.github.io/commercetools-dotnet-core-sdk-v2/docs/html/dc/da2/md_docs_2_graph_q_l.html

However, I can't figure out how to create a Client that can access this.

To Reproduce In my Startup.cs, I tried this:

        services.UseCommercetoolsApi(appConfig, "CommerceToolsSdkConfig");
        var provider = services.BuildServiceProvider();
        var client = provider.GetService<ProjectApiRoot>().GraphQLClient();

I am told that GraphQLClient() does not exist on GetService. I've tried manually adding using commercetools.Sdk.GraphQL.Api; - this does not exist in the SDK.

Expected behavior I would expect the GraphQLClient() method to exist in the SDK, but using a tool like dotPeak from JetBrains, I can not find this anywhere in the DLL.

Screenshots/Code snippet N/A

Stack information (please complete the following information):

Additional context N/A

wehnertb commented 3 months ago

OK - I found there is a new nuget package (I swear I looked for this) and I think that's going to resolve this.