Skip to content
This repository was archived by the owner on Aug 14, 2019. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 37 additions & 37 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "apollo-link-firebase",
"version": "1.1.0",
"version": "1.2.0",
"description": "Query Firebase in GraphQL with Apollo",
"author": {
"name": "wwwy3y3",
Expand Down Expand Up @@ -31,48 +31,48 @@
"start": "./node_modules/.bin/webpack-dev-server --config webpack.config.dev.js --mode development"
},
"devDependencies": {
"@types/chai": "^4.1.2",
"@types/faker": "^4.1.2",
"@types/chai": "^4.1.7",
"@types/faker": "^4.1.5",
"@types/mocha": "^2.2.48",
"@types/node": "9.4.6",
"@types/react": "16.0.40",
"@types/react-dom": "16.0.4",
"@types/sinon": "^4.3.0",
"@types/webpack": "3.8.8",
"@types/webpack-env": "1.13.5",
"antd": "^3.2.3",
"apollo-cache-inmemory": "^1.1.9",
"apollo-client": "^2.2.7",
"apollo-link": "^1.2.1",
"apollo-link-schema": "^1.0.6",
"apollo-utilities": "^1.0.9",
"chai": "^4.1.2",
"@types/node": "11.13.7",
"@types/react": "16.8.14",
"@types/react-dom": "16.8.4",
"@types/sinon": "^7.0.11",
"@types/webpack": "4.4.27",
"@types/webpack-env": "1.13.9",
"antd": "^3.16.5",
"apollo-cache-inmemory": "^1.5.1",
"apollo-client": "^2.5.1",
"apollo-link": "^1.2.11",
"apollo-link-schema": "^1.2.2",
"apollo-utilities": "^1.2.1",
"chai": "^4.2.0",
"faker": "^4.1.0",
"graphql": "0.13.0",
"graphql-anywhere": "^4.1.6",
"graphql-tag": "^2.8.0",
"graphql-tools": "^2.21.0",
"lodash": "^4.17.5",
"graphql": "14.2.1",
"graphql-anywhere": "^4.2.1",
"graphql-tag": "^2.10.1",
"graphql-tools": "^4.0.4",
"lodash": "^4.17.11",
"mocha": "^5.0.4",
"nyc": "^11.6.0",
"react": "^16.2.0",
"react-addons-test-utils": "^15.3.1",
"react-apollo": "2.1.0-rc.1",
"react-dom": "^16.2.0",
"rimraf": "^2.5.4",
"sinon": "^4.4.8",
"ts-loader": "^4.0.0",
"ts-node": "^5.0.1",
"tslint": "^5.9.1",
"tslint-react": "^3.5.1",
"typescript": "^2.7.2",
"webpack": "^4.6.0",
"webpack-cli": "^2.0.10",
"webpack-dev-server": "^3.1.0"
"nyc": "^14.0.0",
"react": "^16.8.6",
"react-addons-test-utils": "^15.6.2",
"react-apollo": "2.5.5",
"react-dom": "^16.8.6",
"rimraf": "^2.6.3",
"sinon": "^7.3.2",
"ts-loader": "^5.4.3",
"ts-node": "^8.1.0",
"tslint": "^5.16.0",
"tslint-react": "^4.0.0",
"typescript": "^3.4.5",
"webpack": "^4.30.0",
"webpack-cli": "^3.3.1",
"webpack-dev-server": "^3.3.1"
},
"repository": "Canner/apollo-link-firebase",
"license": "MIT",
"dependencies": {
"firebase": "^4.11.0"
"firebase": "^5.10.0"
}
}
2 changes: 1 addition & 1 deletion src/rtdb/mutationResolver.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ExecInfo } from 'graphql-anywhere/lib/async';
import { ExecInfo } from 'graphql-anywhere';
import { Resolver } from 'graphql-anywhere';
import * as has from 'lodash/has';
import * as last from 'lodash/last';
Expand Down
4 changes: 3 additions & 1 deletion src/rtdb/queryResolver.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ExecInfo } from 'graphql-anywhere/lib/async';
import { ExecInfo } from 'graphql-anywhere';
import { Resolver } from 'graphql-anywhere';
import { database as firebaseDatabase } from 'firebase';
import * as has from 'lodash/has';
Expand Down Expand Up @@ -73,6 +73,7 @@ const queryResolver: Resolver = async (
// we fetch the new one and replace currentSnapshot
const query = createQuery({
database,
// @ts-ignore
directives: directives.rtdbQuery,
exportVal,
snapshot: currentSnapshot
Expand All @@ -93,6 +94,7 @@ const queryResolver: Resolver = async (
}

// type could be defined in different directives, @rtdbQuery, @rtdbSub...
// @ts-ignore
const typename = hasTypeDirective ? directives.type.name : context.findType(directives);

// firebase treat all data as object, even array
Expand Down
2 changes: 1 addition & 1 deletion src/rtdb/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ export interface DirectiveArgs {
}

export interface SubDirectiveArgs extends DirectiveArgs {
event: string;
event: database.EventType;
}
Loading