Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pequehq/graphql

Package Overview
Dependencies
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pequehq/graphql

Peque GraphQL

  • 1.0.6
  • latest
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

Peque GraphQL

CI coverage

Peque GraphQL is an OOP transposition for Apollo Server Resolver.

Install

npm install @pequehq/graphql reflect-metadata

Note: tsconfig's compilerOptions must have both experimentalDecorators and emitDecoratorMetadata set to true.

Example

import { Resolver, ResolverService } from '@pequehq/graphql';

@Resolver()
class ResolverExample {
  @Query()
  countries(@Args('continent') continent: string): unknown {
    return [
      { id: 1, name: 'italy', continent: 'europe' },
      { id: 2, name: 'spain', continent: 'europe' },
      { id: 3, name: 'china', continent: 'asia' },
    ].filter((country) => country.continent === continent);
  }
}

const resolverService = new ResolverService();

const resolvers = resolverService.get([new ResolverExample()]);

// Add resolvers to your Apollo Server integration.

FAQs

Package last updated on 17 Feb 2022

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