apollo-link-reactive-schema
Advanced tools
Comparing version 2.1.0 to 2.1.1
@@ -53,2 +53,4 @@ "use strict"; | ||
return reactive_graphql_1.graphql(_this.schema, operation.query, null, context, operation.variables) | ||
// reactive-graphql does not necessarely leverage the errors key (https://github.com/mesosphere/reactive-graphql/issues/13) | ||
// so we do it ourself | ||
.pipe(operators_1.catchError(function (error) { return rxjs_1.of({ errors: [new graphql_1.GraphQLError(error.message)] }); })) | ||
@@ -55,0 +57,0 @@ .pipe(operators_1.map(normalizeErrorsField)) |
{ | ||
"name": "apollo-link-reactive-schema", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"description": "Apollo Link that provides a reactive-graphql execution environment to perform operations on a provided reactive schema.", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -15,2 +15,3 @@ # apollo-link-reactive-schema | ||
import { ReactiveSchemaLink } from 'apollo-link-reactive-schema'; | ||
import { gql } from 'graphql-tag'; | ||
@@ -26,2 +27,13 @@ import schema from './path/to/your/schema'; | ||
}); | ||
const query = gql` | ||
# don't forget the @live directive, otherwise you'll experience | ||
# difficulties with subscription>unsubscription>subscription | ||
query @live { | ||
someReactiveField | ||
} | ||
`; | ||
const $res = graphqlClient.watchQuery({ query }); | ||
$res.subscribe(res => console.log(res)); | ||
``` | ||
@@ -28,0 +40,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10201
132
45