diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 1fe43a56..00000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,39 +0,0 @@ -version: 2.0 -jobs: - test: - docker: - - image: 'circleci/node:11.3.0' - steps: - - checkout - - run: - name: Install dependencies - command: yarn install - - run: - name: Test packages - command: yarn test - - run: - name: Get coverage of packages - command: yarn coverage - - publish: - docker: - - image: 'circleci/node:11.3.0' - steps: - - checkout - - run: - name: Install dependencies - command: yarn install - - run: - name: Release packages - command: yarn release -workflows: - version: 2 - test-and-publish: - jobs: - - test - - publish: - requires: - - test - filters: - branches: - only: master diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 00000000..c11ac36f --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: maticzav +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..fcb8f15b --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,28 @@ +name: Release on NPM + +on: + push: + branches: + - main + +jobs: + build: + name: release + runs-on: ubuntu-latest + steps: + # Setup + - uses: actions/checkout@master + - uses: actions/setup-node@v1 + with: + node-version: '13.x' + - run: yarn install + # Publish + - run: yarn build + - run: yarn test + env: + GH_TOKEN: ${{ secrets.GH_SPONSORS_TOKEN }} + - run: yarn coverage + - run: npx semantic-release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..dfaab782 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,21 @@ +name: Test GraphQL Middleware + +on: [push, pull_request] + +jobs: + build: + name: release + runs-on: ubuntu-latest + steps: + # Setup + - uses: actions/checkout@master + - uses: actions/setup-node@v1 + with: + node-version: '13.x' + - run: yarn install + # Test + - run: yarn build + - run: yarn test + env: + GH_TOKEN: ${{ secrets.GH_SPONSORS_TOKEN }} + - run: yarn coverage diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index 05c968c0..00000000 --- a/.prettierrc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "semi": false, - "trailingComma": "all", - "singleQuote": true -} diff --git a/.vscode/settings.json b/.vscode/settings.json index 171f56d0..67ef7931 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -6,10 +6,7 @@ "**/node_modules/**": true }, "typescript.tsdk": "./node_modules/typescript/lib", - "spellright.language": [ - "en" - ], - "spellright.documentTypes": [ - "plaintext" - ] + "spellright.language": ["en"], + "spellright.documentTypes": ["plaintext"], + "editor.formatOnSave": true } diff --git a/LICENSE b/LICENSE index d421713e..7339e0cf 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2019 Prisma +Copyright (c) 2020 Matic Zavadlal Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 0c17c610..ed1a5897 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,7 @@ -# WARNING: This project is currently unmaintained - ---- -

# graphql-middleware -[![CircleCI](https://circleci.com/gh/prisma/graphql-middleware.svg?style=shield)](https://circleci.com/gh/prisma/graphql-middleware) [![codecov](https://codecov.io/gh/prisma/graphql-middleware/branch/master/graph/badge.svg)](https://codecov.io/gh/prisma/graphql-middleware) [![npm version](https://badge.fury.io/js/graphql-middleware.svg)](https://badge.fury.io/js/graphql-middleware) @@ -156,8 +151,8 @@ server.start(() => console.log('Server is running on localhost:4000')) ## Awesome Middlewares [![Awesome](https://awesome.re/badge.svg)](https://awesome.re) -- [graphql-middleware-apollo-upload-server](http://github.com/homeroom-live/graphql-middleware-apollo-upload-server) - Uploading files is hard, that's why this package manages it for you! - [graphql-shield](https://github.com/maticzav/graphql-shield) - Permissions as another layer of abstraction. +- [graphql-middleware-apollo-upload-server](http://github.com/homeroom-live/graphql-middleware-apollo-upload-server) - Uploading files is hard, that's why this package manages it for you! - [graphql-middleware-sentry](https://github.com/maticzav/graphql-middleware-sentry) - Report your server errors to Sentry. - [graphql-middleware-forward-binding](https://github.com/maticzav/graphql-middleware-forward-binding) - GraphQL Binding forwardTo plugin for GraphQL Middleware. - [graphql-yup-middleware](https://github.com/JCMais/graphql-yup-middleware) - Use yup to validate mutation arguments @@ -337,8 +332,12 @@ GraphQL Middleware and `directives` tackle the same problem in a completely diff GraphQL Middleware allows you to modify the context of your resolvers, but we encourage you to use GraphQL Yoga's `documentMiddleware` for this functionality instead. -## Help & Community [![Slack Status](https://slack.prisma.io/badge.svg)](https://slack.prisma.io) +## Thank you + +Thanks to everyone who supported the development of this project. It's an honor to lead a project that helps so many people. -Join our [Slack community](http://slack.prisma.io/) if you run into issues or have questions. We love talking to you! +- [Prisma](http://github.com/prisma) - for sponsoring the project, +- Johannes Schickling - for guiding the project development, and +- everyone else who personally contributed to the project in one way or another. -

Prisma

+Thank you! :heart: diff --git a/prettier.config.js b/prettier.config.js new file mode 100644 index 00000000..edc047cc --- /dev/null +++ b/prettier.config.js @@ -0,0 +1,5 @@ +module.exports = { + semi: false, + trailingComma: 'all', + singleQuote: true, +}