Code Monkey home page Code Monkey logo

metaphysics's Introduction

Build Status

Metaphysics is a GraphQL-compliant API that wraps various Artsy APIs. You can try it here against our staging API.

It is built on express, express-graphql, and graphql. With graphiql providing a sandbox to work with.

It is currently used in production all over the place in Artsy.net, and the Artsy iOS App

Meta

Getting Setup

Set up your .env file based on our example .env.test (the variables you must change for development are separated at the bottom).

Install memcached and Yarn if you don't already have them:

brew install memcached
npm install -g yarn

To start up a development server, clone this repo and run:

yarn install
npm run dev

If you are using VS Code, you can read debugging with VS Code to get inline debugging.

Setting up your local GraphiQL

You will need to set up headers with both:

  • x-access-token - Get your clientID and secret, use this command to generate a token.
  • x-user-id - Go to the users admin and find your user account ID.

If you need to generate a token, this command will create one for you. Add it to your .bash_rc.private and update the values between < and >.

alias generate-access-token='curl "https://stagingapi.artsy.net/oauth2/access_token?client_id=><client id>&client_secret=<client secret>&grant_type=credentials&email=<your email>&password=<your password>&scope=offline_access"'

Testing

npm test to run the entire suite npm run watch to spin up the test watcher

Deployment

PRs merged to master are deployed to staging via Semaphore.

We then use the heroku pipelines to deploy to production when happy with staging.

Add the staging instance as a git remote named staging:

git remote add staging [email protected]:artsy-metaphysics-staging.git

Then promote using the command:

$ heroku pipelines:promote -r staging

metaphysics's People

Contributors

dzucconi avatar broskoski avatar mzikherman avatar alloy avatar orta avatar craigspaeth avatar sweir27 avatar sarahscott avatar l2succes avatar xtina-starr avatar damassi avatar ashfurrow avatar joeyaghion avatar kanaabe avatar mennenia avatar acjay avatar starsirius avatar ashkan18 avatar disposableraft avatar cavvia avatar dylanfareed avatar erikdstock avatar izakp avatar peterood avatar

Watchers

 avatar James Cloos avatar

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.