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.

DSLQuery with fragments

See original GitHub issue

Hi. Is it possible to create query with dsl if I need to pass a fragment or inline fragment within query? No examples for that, and search didn’t help either. For example I want to create something like this:

query getNode {
  node(id: "1234") {
    id
    ... on Model {
      id
      name        
    }
  }
}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
Citocommented, Aug 26, 2021

@chadfurman Yes, GraphQL-Core supports named and inline fragments. One idea how we could add this to the DSL is in PR #235.

0reactions
leszekhanuszcommented, Oct 26, 2021

Fixed in version v3.0.0b0

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fragments - Apollo GraphQL Docs
A GraphQL fragment is a piece of logic that can be shared between multiple queries and mutations. ... Every fragment includes a subset...
Read more >
Highlighting | Elasticsearch Guide [8.5] | Elastic
Specifies how to break the highlighted fragments: chars , sentence , or word . Only valid for the unified and fvh highlighters. Defaults...
Read more >
Elixir's Ecto Querying DSL: Beyond the Basics - SitePoint
Thomas explores Ecto features, including query composition, joins and associations, SQL fragment injection, explicit casting, ...
Read more >
Compose queries dynamically — gql 3 3.5.0b0 documentation
Instantiate a DSLFragment with a name: name_and_appearances = DSLFragment("NameAndAppearances") · Provide the GraphQL type of the fragment with the on method:.
Read more >
Ecto.Query — Ecto v3.9.4 - HexDocs
Provides the Query DSL. Queries are used to retrieve ... API.fragment/1 ) to inject SQL (and non-SQL) fragments into queries. For example, to...
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