GraphQL fragments ?

Just wondering there is an expectation that fragments will be implemented?

I couldn’t find mention of them anywhere, or in the graphql-client gem…

I ran this query just now:

query {
  repository(owner: "wojtekmaj" name:"react-date-picker"){
    object(oid:"50e933af2f28ca8da451c63afcced8dca467f2c7"){
      ...fields
    }
  }
}

fragment fields on Commit {
  oid
  changedFiles
  commitResourcePath
  commitUrl
  message
  resourcePath
  url
  tree{
    entries{
      name
    }
  }
}

And the fragment seemed to work. What is it about fragments that isn’t working for you?

Apologies, my bad.

I was looking here and there (ref material and code) and thought fragments were similar to variables, in that they were added to the json hash with a key of fragments.  As you’ve shown, they are a part of the query value…

No apologies necessary. I’m learning this as I go too 😀