Socket
Socket
Sign inDemoInstall

graphql-type-json

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphql-type-json

JSON scalar types for GraphQL.js


Version published
Weekly downloads
967K
decreased by-3.41%
Maintainers
1
Weekly downloads
 
Created

What is graphql-type-json?

The graphql-type-json npm package provides a way to include JSON objects as a GraphQL type. It allows for the use of arbitrary JSON objects as input or output types within a GraphQL schema, which can be useful when the shape of the data is not known in advance or when a flexible data structure is required.

What are graphql-type-json's main functionalities?

JSON scalar type for GraphQL schema

This feature allows you to use JSON as a scalar type in your GraphQL schema. You can define a field to accept or return a JSON object without specifying its structure in advance.

{"GraphQLJSON": require('graphql-type-json').GraphQLJSON}

Using JSON type in GraphQL queries and mutations

With graphql-type-json, you can define query and mutation fields that accept or return JSON objects. This is useful for endpoints that deal with dynamic or unstructured data.

{"typeDefs": "type Query { getArbitraryData: JSON } type Mutation { submitArbitraryData(data: JSON): Boolean }"}

Other packages similar to graphql-type-json

Keywords

FAQs

Package last updated on 10 Jun 2020

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