Coder Social home page Coder Social logo

graphql-marketplace-stripe's Introduction

Modelling Marketplaces with GraphQL

Simple GraphQL-Yoga server that exposes a declarative GraphQL API for multi-sided marketplace projects. We use Stripe Connect for our marketplace payment infrastructure and Primsa.io for our database communication.

Structure

  • src/schema.graphql defines the Queries and Mutations that are made available to our client applications.
  • src/resolvers/Queries.js implements the Queries (get, list, aggregate). This is the logic that retrieves both data from the Stripe API and our Prisma demo database.
  • src/resolvers/Mutations.js implements the Mutations (create, update, upsert, delete). This is the logic that communicates with the Stripe API for account & payment creation and persist necessary data in our Prisma demo database.
  • datamodel.prisma the datamodel of our Prisma demo database. This shows you all the data types and relations in our database.

Setup

  • npm install
  • Follow steps 1-4 here: https://www.prisma.io/docs/1.17/get-started/01-setting-up-prisma-demo-server-a001/ ** 3.1 select "Demo Server" ** 3.2 select region with smallest ping time ** 3.3 set your name ** 3.4 set stage name dev ** 3.5 select "Don't generate"
  • prisma deploy
  • rename .env.example to .env
  • set the HTTP endpoint returned by prisma deploy in your .env file
  • set a prisma secret in the .env file
  • set your Stripe secret test key in the .env file

Run

graphql-marketplace-stripe's People

Contributors

thorsten-stripe 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.