Code Monkey home page Code Monkey logo

graphql-primitive's Introduction

graphql-primitive Npm version Build Status Coverage Status

A GraphQL Primitive Scalar Type

Overview

GraphQL Primitive Scalar is a scalar that accepts the following Javascript primitives:

  • String
  • Number
  • Boolean
  • undefined
  • null

Ever wanted to accept or send multiple primitives in GraphQL? :)

Installation

npm i graphql-primitive

Usage

import { makeExecutableSchema } from 'graphql-tools';
import GraphQLPrimitive from 'graphql-primitive';

const schemaString = `
scalar Primitive
type Foo {
  aField: [Primitive] # an array of String | Int | Boolean | undefined | null
}
type Query {
  foo: Foo
}
`;

const resolveFunctions = {
  Primitive: GraphQLPrimitive
};

const jsSchema = makeExecutableSchema({
  typeDefs: schemaString,
  resolvers: resolveFunctions
});

Contributing

This project welcomes code contributions, bug reports and feature requests. Please see the guidelines in CONTRIBUTING.md if you are interested in contributing.

License

MIT License

Copyright (c) 2017 Simon Tucker

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

graphql-primitive's People

Contributors

dependabot[bot] avatar greenkeeper[bot] avatar greenkeeperio-bot avatar renovate-bot avatar renovate[bot] avatar srtucker22 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

graphql-primitive's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • chore(deps): update dependency eslint to v6.8.0
  • chore(deps): update dependency eslint to v9
  • chore(deps): update dependency eslint-config-airbnb to v19
  • chore(deps): update dependency eslint-config-airbnb-base to v15
  • chore(deps): update dependency graphql to v16
  • ๐Ÿ” Create all rate-limited PRs at once ๐Ÿ”

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

npm
package.json
  • @babel/cli 7.5.0
  • @babel/core 7.5.4
  • @babel/node 7.5.0
  • @babel/plugin-proposal-class-properties 7.5.0
  • @babel/plugin-proposal-decorators 7.4.4
  • @babel/plugin-proposal-export-namespace-from 7.5.2
  • @babel/plugin-proposal-function-sent 7.5.0
  • @babel/plugin-proposal-json-strings 7.2.0
  • @babel/plugin-proposal-numeric-separator 7.2.0
  • @babel/plugin-proposal-throw-expressions 7.2.0
  • @babel/plugin-syntax-dynamic-import 7.2.0
  • @babel/plugin-syntax-import-meta 7.2.0
  • @babel/preset-env 7.5.4
  • babel-eslint 10.0.2
  • babel-jest 24.8.0
  • babel-preset-es2015 6.24.1
  • babel-preset-stage-2 6.24.1
  • eslint 6.0.1
  • eslint-config-airbnb 17.1.1
  • eslint-config-airbnb-base 13.2.0
  • eslint-plugin-import 2.18.0
  • eslint-plugin-jsx-a11y 6.2.3
  • eslint-plugin-react 7.14.2
  • graphql 14.6.0
  • jest 24.8.0
  • regenerator-runtime 0.13.2
  • graphql ^0.13.0 || ^14.0.0
travis
.travis.yml
  • node 10
  • node 8
  • node 6

  • Check this box to trigger a request for Renovate to run again on this repository

Dependency deprecation warning: babel-preset-es2015 (npm)

On registry https://registry.npmjs.org/, the "latest" version (v6.24.1) of dependency babel-preset-es2015 has the following deprecation notice:

๐Ÿ™Œ Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update!

Marking the latest version of an npm package as deprecated results in the entire package being considered deprecated, so contact the package author you think this is a mistake.

Affected package file(s): package.json

If you don't care about this, you can close this issue and not be warned about babel-preset-es2015's deprecation again. If you would like to completely disable all future deprecation warnings then add the following to your config:

"suppressNotifications": ["deprecationWarningIssues"]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.