★ wanayoo — archive 1999 https://github.com/fsprojects/FSharp.Data.GraphQL/issues/204Nouvelle recherche | Portail wanayoo
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 Client and Fable 2 #204

Open
bilkusg opened this issue Dec 22, 2018 · 10 comments
Open

GraphQL Client and Fable 2 #204

bilkusg opened this issue Dec 22, 2018 · 10 comments

Comments

@bilkusg
Copy link

@bilkusg bilkusg commented Dec 22, 2018

Description

I am using Fable 2 and trying to use the GraphQL client but keep getting errors with the type provider
when I try to build the project.
I suspect this is not working with Fable 2 yet. I get asked to add System.Private.CoreLib
which as far as I can tell is an indication that there's an incompatibility somewhere.
If it is possible to use the client with Fable 2, can someone point me to a working example I can use to find out what's wrong with my setup
And if not, are there plans to support Fable 2 at some point?

Related information

  • Windows 10 pro
  • Branch dev
  • .NET Core 2.1
@johnberzy-bazinga
Copy link
Collaborator

@johnberzy-bazinga johnberzy-bazinga commented Apr 10, 2019

@bilkusg Sorry for the delay. We've decided to rewrite the GraphQL provider. The plan is to support Fable in the near future. You can preview the work in #179.

Any feedback is appreciated!

@nojaf
Copy link

@nojaf nojaf commented May 14, 2019

Hi, should the latest beta work with Fable? I believe the source files are missing from the nuget package.

Is the TypeProvider an Erasure one?

@johnberzy-bazinga
Copy link
Collaborator

@johnberzy-bazinga johnberzy-bazinga commented May 15, 2019

Hi @nojaf,

We haven't added support for Fable in the latest type provider redesign. @alfonsogarciacaro wrote the first Fable integration, so he knew what he was doing w.r.t. Fable. Do you know if the mechanism we were using in the old TP is still valid?

Thanks,
John

@njlr
Copy link

@njlr njlr commented Mar 2, 2020

What is the status of the type provider with Fable?

@fradav
Copy link

@fradav fradav commented May 9, 2020

The status is : not working with Fable since 2.0.
AFAIK, there is only one provider for current fable and it is JsonProvider from @alfonsogarciacaro
The official doc still states that is working with fable client-side, perhaps update?

@alfonsogarciacaro
Copy link
Contributor

@alfonsogarciacaro alfonsogarciacaro commented May 12, 2020

Providers work with latest version of Fable but they cannot use the parts of the BCL that are not supported by Fable. You can find some providers compatible with Fable by typing "provider" here: https://fable.io/community/

@Zaid-Ajaj
Copy link

@Zaid-Ajaj Zaid-Ajaj commented Jun 8, 2020

Recently I have a published a different solution for Fable called Snowflaqe. It is a dotnet CLI tool that code-generates a Fable (or F#) GraphQL client project based on the schema and input query files. The tool also performs validation and partial type-checking against the input queries.

@njlr
Copy link

@njlr njlr commented Jun 8, 2020

Recently I have a published a different solution for Fable called Snowflaqe. It is a dotnet CLI tool that code-generates a Fable (or F#) GraphQL client project based on the schema and input query files. The tool also performs validation and partial type-checking against the input queries.

Interesting! Why code generation over a Type Provider?

@fradav
Copy link

@fradav fradav commented Jun 8, 2020

Thanks @Zaid-Ajaj that's a very convenient solution, but ultimately someone will have to get its hands dirty and properly code the TP for fable 2.* ... I would like to do it, no guarantee.

@Zaid-Ajaj
Copy link

@Zaid-Ajaj Zaid-Ajaj commented Jun 8, 2020

Interesting! Why code generation over a Type Provider?

@njlr Type providers are hard to write, hard to debug and have limitations in which types you can output where you can't generate records or unions. This is very important because AFAIK records are required for proper serialization and deserialization of JSON data given the limited Reflection support on classes for Fable.

but ultimately someone will have to get its hands dirty and properly code the TP for fable 2.* ... I would like to do it, no guarantee.

@fradav Please do! To be honest I personally wouldn't know how the runtime code should behave in Fable 2.0 with classes, let alone generate that via a type provider. For now it is good to have at least one working solution for Fable developers. I have been happily using it myself at work and we are quite enjoying it so far 😄

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

Successfully merging a pull request may close this issue.

None yet
7 participants
You can’t perform that action at this time.