Skip to content

Commit f6a22f7

Browse files
committed
add license
1 parent 3edc877 commit f6a22f7

2 files changed

Lines changed: 24 additions & 2 deletions

File tree

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 Andrej Kyselica
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This is a CosmosDB DataSource for the Apollo GraphQL Server. It was adapted from
44

55
## Usage
66

7-
Use by creating a new class, inheriting from `CosmsosDBDataSource` passing in the CosmosDb container instance (created from the CosmosDB Javascript API)
7+
Use by creating a new class, inheriting from `CosmsosDataSource` passing in the CosmosDb container instance (created from the CosmosDB Javascript API)
88

99
`data-sources/Users.ts`
1010

@@ -16,6 +16,7 @@ export class UserDataSource extends CosmosDataSource<UserDoc, ApolloContext> {}
1616

1717
```typescript
1818
import { CosmosClient } from "@azure/cosmos";
19+
import { CosmosDataSource } from "apollo-datasource-cosmosdb";
1920

2021
const cosmosClient = new CosmosClient({
2122
endpoint: "https://my-cosmos-db.documents.azure.com:443/",
@@ -96,7 +97,7 @@ This library is written in Typescript and exports full type definitions, but usa
9697

9798
```typescript
9899

99-
const thisUser = await users.findOneById(id: string, {ttl}) // => Promise<T>
100+
const thisUser = await users.findOneById(id: string, {ttl}) // => Promise<T | undefined>
100101

101102
const userPair = await users.findManyByIds([id1, id2], {ttl}) // => Promise<(T | undefined)[]>
102103

0 commit comments

Comments
 (0)