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

graphql-directive-uppercase

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphql-directive-uppercase

## Table of Contents

  • 1.0.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

graphql-directive-uppercase

Table of Contents

  • Introduction
  • Install
  • Usage
  • Contributing
  • License

Introduction

This is simple directive how to make you String fields UPPERCASED. On top of it, this could be a good start point for anyone interested in building their own one.

Install

yarn add graphql-directive-uppercase

This package requires graphql and graphql-tools as peer dependency

Usage

import { makeExecutableSchema } from 'graphql-tools';
import uppercaseDirective from 'graphql-directive-uppercase';
import typeDefs from './schema.graphql';
import resolvers from './resolvers';

export default makeExecutableSchema({
  typeDefs,
  resolvers,
  schemaDirectives: {
    upper: uppercaseDirective,
    uppercase: uppercaseDirective
  },
});
GraphQL schema:
type Person {
  id: Int
  name: String @upper
}

type Query {
  persons: [Person]
}

Contributing

I would love to see your contribution. ❤️

For local development (and testing) is all you have to do just yarn and then yarn dev. This will start the server (powered by Micro from ZEIT) and Babel for transpilation of index.js.

Run yarn test for unit tests (we using Jest)

License

The MIT License (MIT) 2018 - Jakub Beneš

FAQs

Package last updated on 05 Apr 2018

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