Skip to content

Commit

Permalink
Update dependencies and rename org
Browse files Browse the repository at this point in the history
  • Loading branch information
blakeembrey committed Oct 17, 2020
1 parent 211f9b7 commit 768cfe3
Show file tree
Hide file tree
Showing 6 changed files with 4,150 additions and 2,667 deletions.
7 changes: 3 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
module.exports = {
parser: "@typescript-eslint/parser",
extends: [
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint",
"plugin:prettier/recommended"
"plugin:prettier/recommended",
],
parserOptions: {
ecmaVersion: 2018,
sourceType: "module"
}
sourceType: "module",
},
};
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ GraphQL on Workers was inspired by [this blog post](https://blog.cloudflare.com/
## Installation

```
npm install @borderlesslabs/worker-graphql --save
npm install @borderless/worker-graphql --save
```

## Usage

```ts
import { processGraphQL } from "@borderlesslabs/worker-graphql";
import { processGraphQL } from "@borderless/worker-graphql";
import { makeExecutableSchema } from "graphql-tools";

const schema = makeExecutableSchema({
Expand All @@ -29,9 +29,9 @@ const schema = makeExecutableSchema({
`,
resolvers: {
Query: {
hello: () => "Hello world!"
}
}
hello: () => "Hello world!",
},
},
});

// Wrap `processGraphQL` with CORS support.
Expand All @@ -43,8 +43,8 @@ const handler = async (req: Request) => {
"Access-Control-Allow-Methods": "GET,POST",
"Access-Control-Allow-Headers":
req.headers.get("Access-Control-Request-Headers") || "Content-Type",
"Access-Control-Allow-Origin": "*"
}
"Access-Control-Allow-Origin": "*",
},
});
}

Expand All @@ -53,7 +53,7 @@ const handler = async (req: Request) => {
return res;
};

addEventListener("fetch", event => {
addEventListener("fetch", (event) => {
event.respondWith(handler(event.request));
});
```
Expand All @@ -62,11 +62,11 @@ addEventListener("fetch", event => {

MIT

[npm-image]: https://img.shields.io/npm/v/@borderlesslabs/worker-graphql.svg?style=flat
[npm-url]: https://npmjs.org/package/@borderlesslabs/worker-graphql
[downloads-image]: https://img.shields.io/npm/dm/@borderlesslabs/worker-graphql.svg?style=flat
[downloads-url]: https://npmjs.org/package/@borderlesslabs/worker-graphql
[travis-image]: https://img.shields.io/travis/BorderlessLabs/worker-graphql.svg?style=flat
[travis-url]: https://travis-ci.org/BorderlessLabs/worker-graphql
[coveralls-image]: https://img.shields.io/coveralls/BorderlessLabs/worker-graphql.svg?style=flat
[coveralls-url]: https://coveralls.io/r/BorderlessLabs/worker-graphql?branch=master
[npm-image]: https://img.shields.io/npm/v/@borderless/worker-graphql.svg?style=flat
[npm-url]: https://npmjs.org/package/@borderless/worker-graphql
[downloads-image]: https://img.shields.io/npm/dm/@borderless/worker-graphql.svg?style=flat
[downloads-url]: https://npmjs.org/package/@borderless/worker-graphql
[travis-image]: https://img.shields.io/travis/borderless/worker-graphql.svg?style=flat
[travis-url]: https://travis-ci.org/borderless/worker-graphql
[coveralls-image]: https://img.shields.io/coveralls/borderless/worker-graphql.svg?style=flat
[coveralls-url]: https://coveralls.io/r/borderless/worker-graphql?branch=master
Loading

0 comments on commit 768cfe3

Please sign in to comment.