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

@genesisx/graphql

Package Overview
Dependencies
Maintainers
14
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@genesisx/graphql

Generator package for generating graphql subgraphs and federations.

  • 4.0.3-beta0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
44
decreased by-55.1%
Maintainers
14
Weekly downloads
 
Created
Source

graphql

This is a generator for generating graphql subgraphs and federation services created by the Genesis project.

How to use

Install the package in your nx workspace, please run one of these commands

npm i @genesisx/graphql

or

yarn add @genesisx/graphql

Using NXConsole: Creating subgraphs graphql service

Select Generator tool from the NX console as shown in the image in your visual studio Navigate to NX console > Generate > @ @genesisx/graphql

And fill in the form as follows;

- appName
Service name that will be under apps folder of your project

-portNumber
Port Number to be changed in file called .env

-templateName
chose if you want to generate a subgraph or federation service from the dropdown. 

Click on Run after filling the details.

Serve your graphql service created through NX console > Serve > <your_project_name>

Via Command line

  • If nx is not already installed then install it using npm install -g nx
  • Use below command to create a template
  • nx generate @genesisx/graphql:templates <AppName> <PortNumber> --templateName=<TemplateName> --no-interactive
  • Replace with the application name you need in string format, should be replaced
  • or just run
  • nx generate @genesisx/graphql:templates
  • It will ask the required parameters

Contribution

Running build and lints

Run nx lint graphql to execute the lint checks on this package.

Run nx build graphql to build this package.

Run nx test graphql to execute the unit tests via Jest.

Publish to NPM

To publish the package you must first be logged into NPM (npm login) then run this command from the root of the project.

  • Make sure the package name in package.json should start with @genesisx/
  • Also use the correct version number in package.json same will be used for the published package.
  • Use your NPM js credentials (Publicis Sapient) with publish rights
  • Verify the package at https://www.npmjs.com/settings/genesisx/packages
npm publish dist/packages/graphql --access public

Local development and testing

If you're going to locally developm and run/test this package you need to build it and copy into node_modules with every change. You can simply do this by running a bash command below:

yarn nx run graphql:build && cp -R dist/packages/graphql/ <new_wsp>/node_modules/@genesisx

FAQs

Package last updated on 29 Apr 2024

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