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

elasticgraph-rack

Package Overview
Dependencies
Maintainers
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

elasticgraph-rack

  • 0.19.0.0
  • Rubygems
  • Socket score

Version published
Maintainers
3
Created
Source

ElasticGraph::Rack

Uses Rack to serve an ElasticGraph application. Intended primarily to make it easy to boot ElasticGraph applications locally, but could also be used to serve an ElasticGraph application from any Rack compatible web server.

Serving an ElasticGraph GraphQL Endpoint

ElasticGraph::Rack::GraphQLEndpoint is a Rack application. Here's an example of using it in a Rack config.ru file:

require 'elastic_graph/graphql'
require 'elastic_graph/rack/graphql_endpoint'

graphql = ElasticGraph::GraphQL.from_yaml_file("path/to/config.yaml")
run ElasticGraph::Rack::GraphQLEndpoint.new(graphql)

Run this with rackup (after installing the rackup gem) or any other rack-compatible server.

Serving a GraphiQL UI

This gem also provides a simple GraphiQL UI using the CDN-hosted GraphiQL assets. Here's an example config.ru to boot that:

require 'elastic_graph/graphql'
require 'elastic_graph/rack/graphiql'

graphql = ElasticGraph::GraphQL.from_yaml_file("path/to/config.yaml")
run ElasticGraph::Rack::GraphiQL.new(graphql)

Run this with rackup (after installing the rackup gem) or any other rack-compatible server.

License

elasticgraph-rack is released under the MIT License.

Part of the distributed code comes from the GraphiQL project, also licensed under the MIT License, Copyright (c) GraphQL Contributors.

FAQs

Package last updated on 10 Dec 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