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.

Unwanted ragment placeholder on scalar types in sample query

See original GitHub issue

This is the sample query generated for one of my queries.

query getClose($id: String!) {
  getClose(id: $id) {
    id {
      ...StringFragment
    }
    fund {
      ...FundSubscriptionFragment
    }
    name {
      ...StringFragment
    }
    targetDate {
      ...DateTimeFragment
    }
  }
}

The problem is id, name and targetDate fields are just scalar type (string and DateTime) so I wish it could be like this.

query getClose($id: String!) {
  getClose(id: $id) {
    id
    fund {
      ...FundSubscriptionFragment
    }
    name
    targetDate
  }
}

I tried to put fieldExpansionDepth to 2 or 3 but nothing changed. Any idea where did I mess things up?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
tuananhtdcommented, Jun 9, 2022

You’re the best!!!

0reactions
newhousecommented, Jun 9, 2022

I’ve decided to fix and publish this for you in version 1.2.3. Enjoy!

Read more comments on GitHub >

github_iconTop Results From Across the Web

gajus/slonik: A Node.js PostgreSQL client with ... - GitHub
Motivation; Example use of sql.type; Performance penalty; Unknown keys ... Slonik has been battle-tested with large data volumes and queries ranging from ...
Read more >
Placeholder Text (String Interpolation) in T-SQL
String Interpolation is a fancy term for a process that takes a string containing placeholders and replaces the placeholders with values. One of ......
Read more >
Dynamically generating SQL queries using Node.js
Introduction to building dynamic SQL queries safely in Node.js ... sql will interpret all placeholder tokens and construct final SQL query.
Read more >
Infinite Queries | TanStack Query Docs
React Query supports a useful version of useQuery called useInfiniteQuery for querying these types of lists. When using useInfiniteQuery , you'll notice a...
Read more >
Schemas and Types - GraphQL
String is one of the built-in scalar types - these are types that resolve to a single scalar object, and can't have sub-selections...
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