[GH-ISSUE #75] Use for gatsby.js #48

Closed
opened 2026-03-03 00:02:58 +03:00 by kerem · 0 comments
Owner

Originally created by @dimaslanjaka on GitHub (Sep 12, 2022).
Original GitHub issue: https://github.com/atulmy/gql-query-builder/issues/75

Can i using this lib to create graphql for gatsby

const { graphql } = require('gatsby')

If can, can you give me example to use this lib for useStaticQuery of graphql with gatsby ?

below codes is gatsby method

import { graphql, useStaticQuery } from "gatsby"
const imagesData = useStaticQuery(graphql`
  query {
    images: allFile(filter: { sourceInstanceName: { eq: "images" } }) {
      edges {
        node {
          relativePath
          absolutePath
          name
          childImageSharp {
            gatsbyImageData
          }
        }
      }
    }
  }
  `)
Originally created by @dimaslanjaka on GitHub (Sep 12, 2022). Original GitHub issue: https://github.com/atulmy/gql-query-builder/issues/75 Can i using this lib to create graphql for gatsby ```js const { graphql } = require('gatsby') ``` If can, can you give me example to use this lib for `useStaticQuery` of `graphql` with `gatsby` ? below codes is gatsby method ```js import { graphql, useStaticQuery } from "gatsby" const imagesData = useStaticQuery(graphql` query { images: allFile(filter: { sourceInstanceName: { eq: "images" } }) { edges { node { relativePath absolutePath name childImageSharp { gatsbyImageData } } } } } `) ```
kerem closed this issue 2026-03-03 00:02:58 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/gql-query-builder#48
No description provided.