New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

com.qwlabs:graphql-builder

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

com.qwlabs:graphql-builder

GraphQL query builder for Java

  • 0.2.16
  • Source
  • Maven
  • Socket score

Version published
Maintainers
1
Source

Graphql Builder

Maven Central Commit License: GPL v3

GraphQL query builder for Java

Installation

Maven


<dependency>
    <groupId>com.qwlabs</groupId>
    <artifactId>graphql-builder</artifactId>
    <version>0.2.15</version>
    <type>pom</type>
</dependency>

Gradle

implementation 'com.qwlabs:graphql-builder:0.2.15'

Usage

query

Gql gql=Gql.query("contents")
        .fields(GqlField.of("nodes").fields("id","content","createdAt"),
        GqlField.of("totalCount"),
        GqlField.of("pageInfo").fields("limit","offset"));
  • gql.buildSegment()
query {contents{nodes{id content createdAt} totalCount pageInfo{limit offset}}}
  • gql.buildPrettifySegment()
query {
    contents {
        nodes {
            id
            content
            createdAt
        }
        totalCount
        pageInfo {
            limit
            offset
        }
    }
}
  • gql.build()
{"query":"query {contents{nodes{id content createdAt} totalCount pageInfo{limit offset}}}", "variables": null}
  • gql.buildPrettify()
{
"query":"query {
    contents {
        nodes {
            id
            content
            createdAt
       }
       totalCount
       pageInfo {
            limit
            offset
        }
       }
    }",
 "variables": null
}

mutation

Gql gql = Gql.mutation("createContents")
        .variables(GqlVariable.of("input", GqlVariables.of(
        GqlVariable.of("content", "111")
        )))
        .fields(GqlFields.of("id", "content", "createdAt"));
  • gql.buildSegment()
mutation {createContents(input:{content:"111"}){id content createdAt}}
  • gql.buildPrettifySegment()
mutation {
    createContents(input:{content:"111"}) {
        id
        content
        createdAt
    }
}
  • gql.build()
{"query":"mutation {createContents(input:{content:\"111\"}){id content createdAt}}", "variables": null}
  • gql.buildPrettify()
{
"query":"mutation {
	createContents(input:{content:\"111\"}) {
        id
        content
        createdAt
    }
}",
 "variables": null
}

FAQs

Package last updated on 11 Apr 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc