question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

GraphQL.Client support dotnet core

See original GitHub issue

When I trying to use GraphQL.Client in Fable, I got some errors, looks currently client project doesn’t support dotnet core(https://github.com/fsprojects/FSharp.Data.GraphQL/pull/103). Here is already a work around to make type provider working in dotnet core (https://github.com/Microsoft/visualfsharp/issues/3303), but I tried with a simple console program and get some errors:

$ dotnet run -d
/Users/z/Projects/Fable/FSharpBB/.paket/Paket.Restore.targets(87,5): warning : Detected a change ('target-framework 'netcoreapp2.0'') in the project file '/Users/z/Projects/Fable/FSharpBB/src/ClientTest/ClientTest.fsproj', calling paket restore [/Users/z/Projects/Fable/FSharpBB/src/ClientTest/ClientTest.fsproj]
/Users/z/Projects/Fable/FSharpBB/src/ClientTest/ClientTest.fsproj : warning NU1701: Package 'FSharp.Data.GraphQL.Client 0.0.2-beta' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.0'. This package may not be fully compatible with your project.
/Users/z/Projects/Fable/FSharpBB/src/ClientTest/ClientTest.fsproj : warning NU1701: Package 'FSharp.Data.GraphQL.Client 0.0.2-beta' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.0'. This package may not be fully compatible with your project.
/Users/z/Projects/Fable/FSharpBB/src/ClientTest/GraphqlTest.fs(7,17): error FS3033: The type provider 'FSharp.Data.GraphQL.Client.GraphQlProvider' reported an error: Failure has occurred while loading a type. [/Users/z/Projects/Fable/FSharpBB/src/ClientTest/ClientTest.fsproj]
/Users/z/Projects/Fable/FSharpBB/src/ClientTest/GraphqlTest.fs(7,17): error FS3033: The type provider 'FSharp.Data.GraphQL.Client.GraphQlProvider' reported an error: Failure has occurred while loading a type. [/Users/z/Projects/Fable/FSharpBB/src/ClientTest/ClientTest.fsproj]
/Users/z/Projects/Fable/FSharpBB/src/ClientTest/GraphqlTest.fs(13,30): error FS0039: The field, constructor or member 'Queries' is not defined. [/Users/z/Projects/Fable/FSharpBB/src/ClientTest/ClientTest.fsproj]
/Users/z/Projects/Fable/FSharpBB/src/ClientTest/GraphqlTest.fs(22,37): error FS0072: Lookup on object of indeterminate type based on information prior to this program point. A type annotation may be needed prior to this program point to constrain the type of the object. This may allow the lookup to be resolved. [/Users/z/Projects/Fable/FSharpBB/src/ClientTest/ClientTest.fsproj]
/Users/z/Projects/Fable/FSharpBB/src/ClientTest/GraphqlTest.fs(23,50): error FS0039: The field, constructor or member 'Types' is not defined. [/Users/z/Projects/Fable/FSharpBB/src/ClientTest/ClientTest.fsproj]
/Users/z/Projects/Fable/FSharpBB/src/ClientTest/GraphqlTest.fs(24,18): error FS0072: Lookup on object of indeterminate type based on information prior to this program point. A type annotation may be needed prior to this program point to constrain the type of the object. This may allow the lookup to be resolved. [/Users/z/Projects/Fable/FSharpBB/src/ClientTest/ClientTest.fsproj]
/Users/z/Projects/Fable/FSharpBB/src/ClientTest/GraphqlTest.fs(24,63): error FS0039: The field, constructor or member 'Types' is not defined. [/Users/z/Projects/Fable/FSharpBB/src/ClientTest/ClientTest.fsproj]
/Users/z/Projects/Fable/FSharpBB/src/ClientTest/GraphqlTest.fs(26,13): error FS0072: Lookup on object of indeterminate type based on information prior to this program point. A type annotation may be needed prior to this program point to constrain the type of the object. This may allow the lookup to be resolved. [/Users/z/Projects/Fable/FSharpBB/src/ClientTest/ClientTest.fsproj]
/Users/z/Projects/Fable/FSharpBB/src/ClientTest/GraphqlTest.fs(27,39): error FS0072: Lookup on object of indeterminate type based on information prior to this program point. A type annotation may be needed prior to this program point to constrain the type of the object. This may allow the lookup to be resolved. [/Users/z/Projects/Fable/FSharpBB/src/ClientTest/ClientTest.fsproj]
/Users/z/Projects/Fable/FSharpBB/src/ClientTest/GraphqlTest.fs(44,30): error FS0039: The field, constructor or member 'Query' is not defined. [/Users/z/Projects/Fable/FSharpBB/src/ClientTest/ClientTest.fsproj]
/Users/z/Projects/Fable/FSharpBB/src/ClientTest/GraphqlTest.fs(56,30): error FS0039: The field, constructor or member 'Query' is not defined. [/Users/z/Projects/Fable/FSharpBB/src/ClientTest/ClientTest.fsproj]

The build failed. Please fix the build errors and run again

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
johnberzy-bazingacommented, Jan 29, 2018

oops, I sent you the linux variation. We should probably handle this in build.sh

0reactions
zaaackcommented, Jan 31, 2018

Yes, thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

A GraphQL Client for .NET Standard
A GraphQL Client for .NET Standard over HTTP. Provides the following packages: Package, Downloads, Nuget Latest. GraphQL.Client ...
Read more >
Consuming a GraphQL API with ASP.NET Core
To consume GraphQL API with the ASP.NET Core app, we are going to use the GraphQL.Client library which will help us in the...
Read more >
Interact with a GraphQL API from a .NET Core Application
In this tutorial, we'll see how to use .NET Core to interact with a GraphQL API. To make things easier, we'll generate our...
Read more >
GraphQl API Client Integration In ASP.NET Core 3.1
This project integrated the GraphQL API client in .net core 3.1. Before going to implementation we need to know what is GraphQL.
Read more >
Which .NET GraphQL Clients Should Your App Use?
NET app developers can, and should, use GraphQL. HotChocolate is an open source GraphQL library to make it easy to develop a GraphQL...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found