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

bsRecord on inline fragment #60

Closed
tmattio opened this issue Oct 19, 2018 · 5 comments
Closed

bsRecord on inline fragment #60

tmattio opened this issue Oct 19, 2018 · 5 comments
Labels

Comments

@tmattio
Copy link

tmattio commented Oct 19, 2018

Hi,

I am trying to write a query containing union types. I first wrote a separated fragment and got a clear message: only inline fragments are supported with union types. So I wrote my query like this:

module Search = [%graphql
  {|
    query Search($query: String!, $searchType: SearchType!) {
      search(first: 10, query: $query, searchType: $searchType) @bsRecord {
        edges @bsRecord {
          node {
            ... on Dataset @bsRecord {
              id
              dataType
            }
          }
        }
      }
    }
  |}
];

But the bsRecord on the ... on Dataset @bsRecord does not work: the fragment is parsed as an object instead of a record. Is this a bug or am I doing something wrong?

Thanks :)

@anmonteiro
Copy link
Contributor

Don't you also need @bsRecord on node?

@tmattio
Copy link
Author

tmattio commented Oct 19, 2018

Adding or removing @bsRecord from node does not change the parsing either.

@mhallin
Copy link
Owner

mhallin commented Oct 28, 2018

This is a bug in the current limitation, thanks for reporting this.

@mhallin mhallin added the bug label Oct 28, 2018
@mhallin
Copy link
Owner

mhallin commented Oct 31, 2018

Fixed in 0.2.8.

@mhallin mhallin closed this as completed Oct 31, 2018
@tmattio
Copy link
Author

tmattio commented Nov 14, 2018

Hi @mhallin! The bug seems to be fixed in 0.2.8 for union types, but I still have the bug for interfaces :/

ylecornec pushed a commit to o1-labs/graphql_ppx that referenced this issue Jun 3, 2022
* ci: would this work?

* ci: add docker:// to release pipeline

* ci: add artifacts to test ppx on alpine

* ci: try static linking

* ci: try static linking

* ci: are we in alpine? how this works?

* ci: are we in alpine? how this works?

* ci: are we in alpine? how this works?

* ci: are we in alpine? how this works?

* ci: are we in alpine? how this works?

* ci: try container action

* ci: try custom container for building alpine image

* ci: adjust release workflow to use docker container
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants