Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@apollo-elements/fast

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@apollo-elements/fast - npm Package Compare versions

Comparing version 1.3.0 to 2.0.0-next.0

CHANGELOG.old.md

41

apollo-element.d.ts

@@ -1,12 +0,11 @@

import type { GraphQLError } from '@apollo-elements/interfaces';
import type { ApolloClient, ApolloError, NormalizedCacheObject } from '@apollo/client/core';
import type { Constructor, Data, GraphQLError, MaybeTDN, MaybeVariables } from '@apollo-elements/core/types';
import type * as C from '@apollo/client/core';
import type { CustomElement } from '@apollo-elements/core/types';
import type { ApolloController } from '@apollo-elements/core';
import { update } from '@apollo-elements/core/apollo-controller';
import { FASTElement } from '@microsoft/fast-element';
declare const ApolloElement_base: import("@apollo-elements/interfaces").Constructor<import("@apollo-elements/interfaces").ApolloElementInterface> & Pick<typeof import("@apollo-elements/interfaces").ApolloElementInterface, "prototype" | "documentType"> & {
declare const ApolloElement_base: Constructor<FASTElement & CustomElement> & {
new <D_1 extends MaybeTDN = MaybeTDN, V_1 = MaybeVariables<D_1>>(): import("@apollo-elements/core").ApolloElementElement<D_1, V_1>;
documentType: "query" | "mutation" | "subscription" | "document";
observedAttributes?: string[] | undefined;
} & (new () => HTMLElement & FASTElement) & {
from<TBase extends {
new (): HTMLElement;
prototype: HTMLElement;
}>(BaseType: TBase): new () => InstanceType<TBase> & FASTElement;
define<TType extends Function>(type: TType, nameOrDef?: string | import("@microsoft/fast-element").PartialFASTElementDefinition | undefined): TType;
};

@@ -18,15 +17,23 @@ /**

*
* See [`ApolloElementInterface`](https://apolloelements.dev/api/interfaces/element) for more information on events
* See [`ApolloElementInterface`](https://apolloelements.dev/api/core/interfaces/element) for more information on events
*
* @element
*/
export declare class ApolloElement extends ApolloElement_base {
context?: Record<string, unknown>;
variables: unknown | null;
data: unknown | null;
client: ApolloClient<NormalizedCacheObject> | null;
error: ApolloError | Error | null;
errors: readonly GraphQLError[] | null;
export declare class ApolloElement<D extends MaybeTDN = MaybeTDN, V = MaybeVariables<D>> extends ApolloElement_base<D, V> {
controller: ApolloController<D, V>;
readyToReceiveDocument: boolean;
called: boolean;
/** @summary Whether a request is in flight. */
loading: boolean;
/** @summary The Apollo Client instance */
client: C.ApolloClient<C.NormalizedCacheObject> | null;
/** @summary Latest Data. */
data: Data<D> | null;
/** @summary Latest error */
error: Error | C.ApolloError | null;
/** @summary Latest errors */
errors: readonly GraphQLError[];
get updateComplete(): Promise<boolean>;
[update](properties: Partial<this>): void;
}
export {};
import { __decorate } from "tslib";
import { hosted } from './decorators.js';
import { update } from '@apollo-elements/core/apollo-controller';
import { ApolloElementMixin } from '@apollo-elements/mixins/apollo-element-mixin';
import { FASTElement, attr, observable } from '@microsoft/fast-element';
import { DOM, FASTElement, attr, observable } from '@microsoft/fast-element';
/**

@@ -9,3 +11,3 @@ * `ApolloElement`

*
* See [`ApolloElementInterface`](https://apolloelements.dev/api/interfaces/element) for more information on events
* See [`ApolloElementInterface`](https://apolloelements.dev/api/core/interfaces/element) for more information on events
*

@@ -18,24 +20,46 @@ * @element

super(...arguments);
this.readyToReceiveDocument = false;
this.called = false;
/** @summary Whether a request is in flight. */
this.loading = false;
/** @summary The Apollo Client instance */
this.client = (_a = window.__APOLLO_CLIENT__) !== null && _a !== void 0 ? _a : null;
/** @summary Latest Data. */
this.data = null;
this.client = (_a = window.__APOLLO_CLIENT__) !== null && _a !== void 0 ? _a : null;
/** @summary Latest error */
this.error = null;
this.errors = null;
this.loading = false;
/** @summary Latest errors */
this.errors = [];
}
get updateComplete() {
return DOM.nextUpdate().then(() => true);
}
[update](properties) {
for (const [k, v] of Object.entries(properties))
(this[k] !== v) && (this[k] = v);
}
}
__decorate([
observable
], ApolloElement.prototype, "data", void 0);
], ApolloElement.prototype, "called", void 0);
__decorate([
hosted(),
attr({ mode: 'boolean' })
], ApolloElement.prototype, "loading", void 0);
__decorate([
hosted(),
observable
], ApolloElement.prototype, "client", void 0);
__decorate([
hosted(),
observable
], ApolloElement.prototype, "data", void 0);
__decorate([
hosted(),
observable
], ApolloElement.prototype, "error", void 0);
__decorate([
hosted(),
observable
], ApolloElement.prototype, "errors", void 0);
__decorate([
attr({ mode: 'boolean' })
], ApolloElement.prototype, "loading", void 0);
//# sourceMappingURL=apollo-element.js.map
import { __decorate } from "tslib";
import { expect, fixture, unsafeStatic, html as fhtml } from '@open-wc/testing';
import { expect, fixture } from '@open-wc/testing';
import { unsafeStatic, html as h } from 'lit/static-html.js';
import { ApolloElement } from './apollo-element';
import { customElement, DOM, FASTElement, html } from '@microsoft/fast-element';
import { assertType, isApolloError } from '@apollo-elements/test-helpers';
import { assertType, isApolloError } from '@apollo-elements/test';
describe('[fast] ApolloElement', function describeApolloElement() {

@@ -19,3 +20,3 @@ it('is an instance of FASTElement', async function () {

const tag = unsafeStatic(name);
const element = await fixture(fhtml `<${tag}></${tag}>`);
const element = await fixture(h `<${tag}></${tag}>`);
expect(element).to.be.an.instanceOf(FASTElement);

@@ -33,3 +34,3 @@ });

const tag = unsafeStatic(name);
const element = await fixture(fhtml `<${tag}></${tag}>`);
const element = await fixture(h `<${tag}></${tag}>`);
// @ts-expect-error: just testing assignment and rendering

@@ -49,3 +50,3 @@ element.client = { test: 'CLIENT' };

const tag = unsafeStatic(name);
const element = await fixture(fhtml `<${tag} .error="${'error'}"></${tag}>`);
const element = await fixture(h `<${tag} .error="${'error'}"></${tag}>`);
expect(element).shadowDom.to.equal('error');

@@ -62,3 +63,3 @@ });

const tag = unsafeStatic(name);
const element = await fixture(fhtml `<${tag} .loading="${true}"></${tag}>`);
const element = await fixture(h `<${tag} .loading="${true}"></${tag}>`);
expect(element).shadowDom.to.equal('LOADING');

@@ -65,0 +66,0 @@ });

@@ -1,6 +0,9 @@

import type { ApolloMutationInterface, Constructor, Data, RefetchQueriesType, Variables } from '@apollo-elements/interfaces';
import type { OperationVariables } from '@apollo/client/core';
import { ApolloElement } from './apollo-element';
declare const ApolloMutation_base: Constructor<ApolloElement> & {
new <D_1, V_1 = Record<string, any>>(): ApolloMutationInterface<D_1, V_1>;
import type { Constructor, Data, Variables, RefetchQueriesType, MaybeTDN, MaybeVariables } from '@apollo-elements/core/types';
import { ApolloElement } from './apollo-element.js';
declare const ApolloMutation_base: Constructor<ApolloElement<MaybeTDN, {
[key: string]: any;
} | import("@apollo/client/core").OperationVariables>> & {
new <D_1 extends MaybeTDN = MaybeTDN, V_1 = MaybeVariables<D_1>>(): ApolloElement<MaybeTDN, {
[key: string]: any;
} | import("@apollo/client/core").OperationVariables> & import("@apollo-elements/core/types").ApolloMutationElement<D_1, V_1>;
documentType: "mutation";

@@ -14,9 +17,9 @@ observedAttributes?: string[] | undefined;

*
* See [`ApolloMutationInterface`](https://apolloelements.dev/api/interfaces/mutation) for more information on events
* See [`ApolloMutationInterface`](https://apolloelements.dev/api/core/interfaces/mutation) for more information on events
*
* @element
*/
export declare class ApolloMutation<D = unknown, V = OperationVariables> extends ApolloMutation_base<D, V> implements ApolloMutationInterface<D, V> {
export declare class ApolloMutation<D extends MaybeTDN = MaybeTDN, V = MaybeVariables<D>> extends ApolloMutation_base<D, V> {
/**
* Latest mutation data.
* @summary Latest mutation data.
*/

@@ -40,4 +43,4 @@ data: Data<D> | null;

awaitRefetchQueries?: boolean;
fetchPolicy?: ApolloMutationInterface<D, V>['fetchPolicy'];
fetchPolicy?: 'no-cache';
}
export {};
import { __decorate } from "tslib";
import { attr } from '@microsoft/fast-element';
import { splitCommasAndTrim } from '@apollo-elements/lib/helpers';
import { ApolloElement } from './apollo-element';
import { splitCommasAndTrim } from '@apollo-elements/core/lib/helpers';
import { ApolloElement } from './apollo-element.js';
import { ApolloMutationMixin } from '@apollo-elements/mixins/apollo-mutation-mixin';
import { hosted } from './decorators.js';
/**

@@ -11,3 +12,3 @@ * `ApolloMutation`

*
* See [`ApolloMutationInterface`](https://apolloelements.dev/api/interfaces/mutation) for more information on events
* See [`ApolloMutationInterface`](https://apolloelements.dev/api/core/interfaces/mutation) for more information on events
*

@@ -31,5 +32,7 @@ * @element

__decorate([
hosted(),
attr({ mode: 'boolean' })
], ApolloMutation.prototype, "called", void 0);
__decorate([
hosted({ path: 'options' }),
attr({

@@ -47,7 +50,9 @@ mode: 'fromView',

__decorate([
hosted({ path: 'options' }),
attr({ mode: 'boolean', attribute: 'await-refetch-queries' })
], ApolloMutation.prototype, "awaitRefetchQueries", void 0);
__decorate([
hosted({ path: 'options' }),
attr({ attribute: 'fetch-policy' })
], ApolloMutation.prototype, "fetchPolicy", void 0);
//# sourceMappingURL=apollo-mutation.js.map

@@ -1,1 +0,1 @@

import 'sinon-chai';
export {};
import { __decorate } from "tslib";
import { setupSpies, setupStubs, } from '@apollo-elements/test-helpers';
import { aTimeout, expect, fixture, html as fhtml, nextFrame, unsafeStatic, } from '@open-wc/testing';
import { setupClient, teardownClient, isApolloError, assertType, } from '@apollo-elements/test-helpers';
import { setupSpies, setupStubs, } from '@apollo-elements/test';
import { expect, fixture } from '@open-wc/testing';
import { html as h, unsafeStatic } from 'lit/static-html.js';
import { setupClient, teardownClient, isApolloError, assertType, stringify, } from '@apollo-elements/test';
import { ApolloMutation } from './apollo-mutation';
import { FASTElement, html, customElement, DOM } from '@microsoft/fast-element';
import { describeMutation } from '@apollo-elements/test-helpers/mutation.test';
import 'sinon-chai';
import { describeMutation } from '@apollo-elements/test/mutation.test';
const template = html `
<output id="called">${x => x.stringify(x.called)}</output>
<output id="data">${x => x.stringify(x.data)}</output>
<output id="error">${x => x.stringify(x.error)}</output>
<output id="errors">${x => x.stringify(x.errors)}</output>
<output id="loading">${x => x.stringify(x.loading)}</output>
<output id="called">${x => stringify(x.called)}</output>
<output id="data">${x => stringify(x.data)}</output>
<output id="error">${x => stringify(x.error)}</output>
<output id="errors">${x => stringify(x.errors)}</output>
<output id="loading">${x => stringify(x.loading)}</output>
`;

@@ -19,10 +19,7 @@ let counter = -1;

async hasRendered() {
await nextFrame();
await DOM.nextUpdate();
await nextFrame();
await aTimeout(50);
await this.updateComplete;
return this;
}
stringify(x) {
return JSON.stringify(x, null, 2);
$(id) {
return this.shadowRoot.getElementById(id);
}

@@ -82,3 +79,3 @@ };

const tag = unsafeStatic(name);
const element = await fixture(fhtml `<${tag} .data="${{ foo: 'bar' }}"></${tag}>`);
const element = await fixture(h `<${tag} .data="${{ foo: 'bar' }}"></${tag}>`);
expect(element).shadowDom.to.equal('bar');

@@ -85,0 +82,0 @@ });

@@ -1,8 +0,15 @@

import type { ApolloQueryInterface, Constructor, Data, Variables } from '@apollo-elements/interfaces';
import { ApolloElement } from './apollo-element';
import { NetworkStatus, OperationVariables } from '@apollo/client/core';
declare const ApolloQuery_base: {
new <D_1 = unknown, V_1 = Record<string, any>>(...a: any[]): ApolloQueryInterface<D_1, V_1>;
documentType: "query";
} & Constructor<ApolloElement>;
import type { Constructor, Data, MaybeTDN, MaybeVariables, NextFetchPolicyFunction, Variables } from '@apollo-elements/core/types';
import type { ErrorPolicy, WatchQueryFetchPolicy } from '@apollo/client/core';
import { ApolloElement } from './apollo-element.js';
import { NetworkStatus } from '@apollo/client/core';
declare const ApolloQuery_base: Constructor<ApolloElement<MaybeTDN, {
[key: string]: any;
} | import("@apollo/client/core").OperationVariables>> & {
new <D_1 extends MaybeTDN = MaybeTDN, V_1 = MaybeVariables<D_1>>(...a: any[]): ApolloElement<MaybeTDN, {
[key: string]: any;
} | import("@apollo/client/core").OperationVariables> & import("@apollo-elements/core/types").ApolloQueryElement<D_1, V_1>;
documentType: "query"; /**
* Latest query data.
*/
};
/**

@@ -15,6 +22,6 @@ * `ApolloQuery`

*
* See [`ApolloQueryInterface`](https://apolloelements.dev/api/interfaces/query) for more information on events
* See [`ApolloQueryInterface`](https://apolloelements.dev/api/core/interfaces/query) for more information on events
*
*/
export declare class ApolloQuery<D = unknown, V = OperationVariables> extends ApolloQuery_base<D, V> implements ApolloQueryInterface<D, V> {
export declare class ApolloQuery<D extends MaybeTDN = MaybeTDN, V = MaybeVariables<D>> extends ApolloQuery_base<D, V> {
/**

@@ -31,5 +38,7 @@ * Latest query data.

networkStatus: NetworkStatus;
fetchPolicy?: ApolloQueryInterface<D, V>['fetchPolicy'];
nextFetchPolicy?: ApolloQueryInterface<D, V>['nextFetchPolicy'];
fetchPolicy?: WatchQueryFetchPolicy;
errorPolicy?: ErrorPolicy;
nextFetchPolicy?: WatchQueryFetchPolicy | NextFetchPolicyFunction<D, V>;
noAutoSubscribe: boolean;
}
export {};
import { __decorate } from "tslib";
import { ApolloElement } from './apollo-element';
import { ApolloElement } from './apollo-element.js';
import { NetworkStatus } from '@apollo/client/core';
import { attr, nullableNumberConverter } from '@microsoft/fast-element';
import { ApolloQueryMixin } from '@apollo-elements/mixins/apollo-query-mixin';
import { hosted } from './decorators.js';
/**

@@ -13,3 +14,3 @@ * `ApolloQuery`

*
* See [`ApolloQueryInterface`](https://apolloelements.dev/api/interfaces/query) for more information on events
* See [`ApolloQueryInterface`](https://apolloelements.dev/api/core/interfaces/query) for more information on events
*

@@ -21,15 +22,25 @@ */

this.networkStatus = NetworkStatus.ready;
this.noAutoSubscribe = false;
}
}
__decorate([
hosted(),
attr({ converter: nullableNumberConverter })
], ApolloQuery.prototype, "networkStatus", void 0);
__decorate([
hosted({ path: 'options' }),
attr({ attribute: 'fetch-policy' })
], ApolloQuery.prototype, "fetchPolicy", void 0);
__decorate([
attr({
attribute: 'next-fetch-policy',
})
hosted({ path: 'options' }),
attr({ attribute: 'error-policy' })
], ApolloQuery.prototype, "errorPolicy", void 0);
__decorate([
hosted({ path: 'options' }),
attr({ attribute: 'next-fetch-policy' })
], ApolloQuery.prototype, "nextFetchPolicy", void 0);
__decorate([
hosted({ path: 'options' }),
attr({ attribute: 'no-auto-subscribe', mode: 'boolean' })
], ApolloQuery.prototype, "noAutoSubscribe", void 0);
//# sourceMappingURL=apollo-query.js.map
import { __decorate } from "tslib";
import { fixture, unsafeStatic, expect, html as fhtml, nextFrame, aTimeout, } from '@open-wc/testing';
import { fixture, expect } from '@open-wc/testing';
import { unsafeStatic, html as h } from 'lit/static-html.js';
import { ApolloQuery } from './apollo-query';
import { FASTElement, customElement, html, DOM } from '@microsoft/fast-element';
import { assertType, isApolloError, setupSpies, setupStubs } from '@apollo-elements/test-helpers';
import { describeQuery } from '@apollo-elements/test-helpers/query.test';
import { assertType, isApolloError, setupSpies, setupStubs, stringify, } from '@apollo-elements/test';
import { describeQuery } from '@apollo-elements/test/query.test';
const template = html `
<output id="data">${x => x.stringify(x.data)}</output>
<output id="error">${x => x.stringify(x.error)}</output>
<output id="errors">${x => x.stringify(x.errors)}</output>
<output id="loading">${x => x.stringify(x.loading)}</output>
<output id="networkStatus">${x => x.stringify(x.networkStatus)}</output>
<output id="data">${x => stringify(x.data)}</output>
<output id="error">${x => stringify(x.error)}</output>
<output id="errors">${x => stringify(x.errors)}</output>
<output id="loading">${x => stringify(x.loading)}</output>
<output id="networkStatus">${x => stringify(x.networkStatus)}</output>
`;
let TestableApolloQuery = class TestableApolloQuery extends ApolloQuery {
async hasRendered() {
await nextFrame();
await DOM.nextUpdate();
await nextFrame();
await aTimeout(50);
await this.updateComplete;
return this;
}
stringify(x) {
return JSON.stringify(x, null, 2);
$(id) {
return this.shadowRoot.getElementById(id);
}

@@ -60,3 +58,3 @@ };

const tag = unsafeStatic(name);
const el = await fixture(fhtml `<${tag}></${tag}>`);
const el = await fixture(h `<${tag}></${tag}>`);
expect(el).to.be.an.instanceOf(FASTElement);

@@ -74,3 +72,3 @@ });

const tag = unsafeStatic(name);
const element = await fixture(fhtml `<${tag} .data="${{ foo: 'bar' }}"></${tag}>`);
const element = await fixture(h `<${tag} .data="${{ foo: 'bar' }}"></${tag}>`);
expect(element).shadowDom.to.equal('bar');

@@ -106,4 +104,4 @@ });

assertType(this.fetchPolicy);
assertType(this.nextFetchPolicy);
assertType(this.nextFetchPolicy);
if (typeof this.nextFetchPolicy !== 'function')
assertType(this.nextFetchPolicy);
assertType(this.networkStatus);

@@ -119,3 +117,2 @@ assertType(this.networkStatus);

assertType(this.noAutoSubscribe);
assertType(this.observableQuery);
assertType(this.options);

@@ -122,0 +119,0 @@ /* eslint-enable max-len, func-call-spacing, no-multi-spaces */

@@ -1,8 +0,12 @@

import type { OperationVariables } from '@apollo/client/core';
import type { ApolloSubscriptionInterface, Constructor, Data, Variables } from '@apollo-elements/interfaces';
import { ApolloElement } from './apollo-element';
declare const ApolloSubscription_base: {
new <D_1 = unknown, V_1 = Record<string, any>>(...a: any[]): ApolloSubscriptionInterface<D_1, V_1>;
import type { Constructor, Data, MaybeTDN, MaybeVariables, Variables } from '@apollo-elements/core/types';
import type { FetchPolicy } from '@apollo/client/core';
import { ApolloElement } from './apollo-element.js';
declare const ApolloSubscription_base: Constructor<ApolloElement<MaybeTDN, {
[key: string]: any;
} | import("@apollo/client/core").OperationVariables>> & {
new <D_1 extends MaybeTDN = MaybeTDN, V_1 = MaybeVariables<D_1>>(...a: any[]): ApolloElement<MaybeTDN, {
[key: string]: any;
} | import("@apollo/client/core").OperationVariables> & import("@apollo-elements/core/types").ApolloSubscriptionElement<D_1, V_1>;
documentType: "subscription";
} & Constructor<ApolloElement>;
};
/**

@@ -15,6 +19,6 @@ * `ApolloSubscription`

*
* See [`ApolloSubscriptionInterface`](https://apolloelements.dev/api/interfaces/subscription) for more information on events
* See [`ApolloSubscriptionInterface`](https://apolloelements.dev/api/core/interfaces/subscription) for more information on events
*
*/
export declare class ApolloSubscription<D = unknown, V = OperationVariables> extends ApolloSubscription_base<D, V> implements ApolloSubscriptionInterface<D, V> {
export declare class ApolloSubscription<D extends MaybeTDN = MaybeTDN, V = MaybeVariables<D>> extends ApolloSubscription_base<D, V> {
/**

@@ -30,4 +34,4 @@ * Latest subscription data.

variables: Variables<D, V> | null;
fetchPolicy: ApolloSubscriptionInterface<D, V>['fetchPolicy'];
fetchPolicy?: FetchPolicy;
}
export {};
import { __decorate } from "tslib";
import { ApolloElement } from './apollo-element';
import { ApolloElement } from './apollo-element.js';
import { ApolloSubscriptionMixin } from '@apollo-elements/mixins/apollo-subscription-mixin';
import { attr } from '@microsoft/fast-element';
import { hosted } from './decorators.js';
/**

@@ -12,3 +13,3 @@ * `ApolloSubscription`

*
* See [`ApolloSubscriptionInterface`](https://apolloelements.dev/api/interfaces/subscription) for more information on events
* See [`ApolloSubscriptionInterface`](https://apolloelements.dev/api/core/interfaces/subscription) for more information on events
*

@@ -19,6 +20,5 @@ */

__decorate([
attr({
attribute: 'fetch-policy',
})
hosted({ path: 'options' }),
attr({ attribute: 'fetch-policy' })
], ApolloSubscription.prototype, "fetchPolicy", void 0);
//# sourceMappingURL=apollo-subscription.js.map
import { __decorate } from "tslib";
import { setupSpies, setupStubs } from '@apollo-elements/test-helpers';
import { aTimeout, expect, fixture, html as fhtml, nextFrame, unsafeStatic, } from '@open-wc/testing';
import { setupSpies, setupStubs, stringify, } from '@apollo-elements/test';
import { expect, fixture } from '@open-wc/testing';
import { html as h, unsafeStatic } from 'lit/static-html.js';
import { FASTElement, customElement, DOM, html } from '@microsoft/fast-element';
import { assertType, isApolloError } from '@apollo-elements/test-helpers';
import { describeSubscription } from '@apollo-elements/test-helpers/subscription.test';
import { assertType, isApolloError } from '@apollo-elements/test';
import { describeSubscription } from '@apollo-elements/test/subscription.test';
import { ApolloSubscription } from './apollo-subscription';
const template = html `
<output id="data">${x => x.stringify(x.data)}</output>
<output id="error">${x => x.stringify(x.error)}</output>
<output id="loading">${x => x.stringify(x.loading)}</output>
<output id="data">${x => stringify(x.data)}</output>
<output id="error">${x => stringify(x.error)}</output>
<output id="loading">${x => stringify(x.loading)}</output>
`;
let TestableApolloSubscription = class TestableApolloSubscription extends ApolloSubscription {
async hasRendered() {
await nextFrame();
await DOM.nextUpdate();
await nextFrame();
await aTimeout(50);
return this;
}
stringify(x) {
return JSON.stringify(x, null, 2);
$(id) {
return this.shadowRoot.getElementById(id);
}

@@ -70,3 +68,3 @@ };

const tag = unsafeStatic(name);
const element = await fixture(fhtml `<${tag} .data="${{ foo: 'bar' }}"></${tag}>`);
const element = await fixture(h `<${tag} .data="${{ foo: 'bar' }}"></${tag}>`);
expect(element).shadowDom.to.equal('bar');

@@ -104,4 +102,2 @@ });

assertType(this.noAutoSubscribe);
assertType(this.observable);
assertType(this.observableSubscription);
/* eslint-enable max-len, func-call-spacing, no-multi-spaces */

@@ -108,0 +104,0 @@ }

@@ -1,164 +0,26 @@

# Change Log
# @apollo-elements/fast
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## 2.0.0-next.0
### Major Changes
# [1.3.0](https://github.com/apollo-elements/apollo-elements/compare/@apollo-elements/fast@1.2.3...@apollo-elements/fast@1.3.0) (2021-01-17)
- b5f2502f: Makes GraphQL script children opt-in
Removes the ability to read GraphQL documents (i.e. `query`, `mutation`, or `subscription`) and variables from the DOM via `<script type="application/graphql">` or json.
You can opt-back in to this behaviour by applying the `GraphQLScriptChildMixin` from `@apollo-elements/mixins`.
`<apollo-*>` components all still have this facility. Be careful when accepting user-generated HTML, as it means users can make arbitrary queries by adding HTML to the document.
Read [the docs](https://apolloelements.dev/api/libraries/mixins/graphql-script-child-mixin/) for more info
Deprecates `@apollo-elements/lib` and `@apollo-elements/interfaces`
Removes the `lib` and `interfaces` packages, and moves their contents to `core`.
If you were for some reason importing these, update your imports.
### Patch Changes
### Bug Fixes
* data and variable types ([fb92012](https://github.com/apollo-elements/apollo-elements/commit/fb920126e2eaf87546975d40d8cab50bc64cdc27))
### Features
* add canAutoSubscribe getter ([0d8aeba](https://github.com/apollo-elements/apollo-elements/commit/0d8aeba530884384f383ad91f79b8e9e0fb73c7f))
* add observed attributes ([5b2f348](https://github.com/apollo-elements/apollo-elements/commit/5b2f3481ea2db6b4cc507e26c5542a89bb84c74b))
# [1.3.0-alpha.0](https://github.com/apollo-elements/apollo-elements/compare/@apollo-elements/fast@1.2.3...@apollo-elements/fast@1.3.0-alpha.0) (2021-01-17)
### Bug Fixes
* data and variable types ([a5c919b](https://github.com/apollo-elements/apollo-elements/commit/a5c919bed9c69fd164e8ef66c54f8413c4192a1b))
### Features
* add canAutoSubscribe getter ([0c336ae](https://github.com/apollo-elements/apollo-elements/commit/0c336ae995eb530fcde884bebd5ba5f18f81e4d2))
* add observed attributes ([43bf154](https://github.com/apollo-elements/apollo-elements/commit/43bf1544ecda358f4478d482f5c4cb0e1da60781))
## [1.2.3](https://github.com/apollo-elements/apollo-elements/compare/@apollo-elements/fast@1.2.2...@apollo-elements/fast@1.2.3) (2021-01-14)
**Note:** Version bump only for package @apollo-elements/fast
## [1.2.2](https://github.com/apollo-elements/apollo-elements/compare/@apollo-elements/fast@1.2.1...@apollo-elements/fast@1.2.2) (2021-01-07)
### Bug Fixes
* depend on interfaces package ([90e5974](https://github.com/apollo-elements/apollo-elements/commit/90e5974946f502925aa1d7f1f9fbb1ecbe4302dc))
## [1.2.1](https://github.com/apollo-elements/apollo-elements/compare/@apollo-elements/fast@1.2.0...@apollo-elements/fast@1.2.1) (2021-01-04)
### Bug Fixes
* fix mixin types ([d3f789f](https://github.com/apollo-elements/apollo-elements/commit/d3f789f62cc088505bf7a6f4e390ac37c54ef6c1))
# [1.2.0](https://github.com/apollo-elements/apollo-elements/compare/@apollo-elements/fast@1.2.0-alpha.2...@apollo-elements/fast@1.2.0) (2021-01-04)
### Bug Fixes
* remove .ts sources from packages ([c71057e](https://github.com/apollo-elements/apollo-elements/commit/c71057ee42ae610621113d5da9555f0a8c42d96c))
* **lib:** add graphql as peerDependency ([6804208](https://github.com/apollo-elements/apollo-elements/commit/68042089167222b8ca13895f88077b38e973e186))
# [1.2.0-alpha.2](https://github.com/apollo-elements/apollo-elements/compare/@apollo-elements/fast@1.2.0-alpha.0...@apollo-elements/fast@1.2.0-alpha.2) (2020-12-21)
### Features
* support for TypedDocumentNode ([d39ca4e](https://github.com/apollo-elements/apollo-elements/commit/d39ca4e0094220cfceba97b9bfe59ed078045560))
# [1.2.0-alpha.1](https://github.com/apollo-elements/apollo-elements/compare/@apollo-elements/fast@1.2.0-alpha.0...@apollo-elements/fast@1.2.0-alpha.1) (2020-12-05)
### Features
* support for TypedDocumentNode ([152b4f0](https://github.com/apollo-elements/apollo-elements/commit/152b4f0e66ff22b7aa30c7b926db8291b0cbdfea))
# [1.2.0-alpha.0](https://github.com/apollo-elements/apollo-elements/compare/@apollo-elements/fast@1.1.3...@apollo-elements/fast@1.2.0-alpha.0) (2020-12-04)
### Bug Fixes
* package export maps ([1eaa0ed](https://github.com/apollo-elements/apollo-elements/commit/1eaa0eda5d329b7c7efdf732b63599b912eb8fc8))
### Features
* support TypeScript strict mode ([a8953d0](https://github.com/apollo-elements/apollo-elements/commit/a8953d08d8e050d9ad4e5b9728a7ed44fcc18fa8))
## [1.1.3](https://github.com/apollo-elements/apollo-elements/compare/@apollo-elements/fast@1.1.2...@apollo-elements/fast@1.1.3) (2020-11-22)
**Note:** Version bump only for package @apollo-elements/fast
## [1.1.2](https://github.com/apollo-elements/apollo-elements/compare/@apollo-elements/fast@1.1.1...@apollo-elements/fast@1.1.2) (2020-11-08)
### Bug Fixes
* **fast:** property descriptors ([adad450](https://github.com/apollo-elements/apollo-elements/commit/adad4504e80e260b334eb88049871f8049d970ef))
* **fast:** set default for networkStatus ([28c75e7](https://github.com/apollo-elements/apollo-elements/commit/28c75e78cf169cd5f7ec13a3bb8f3953902fc988))
## [1.1.1](https://github.com/apollo-elements/apollo-elements/compare/@apollo-elements/fast@1.1.0...@apollo-elements/fast@1.1.1) (2020-10-30)
**Note:** Version bump only for package @apollo-elements/fast
# [1.1.0](https://github.com/apollo-elements/apollo-elements/compare/@apollo-elements/fast@1.0.0...@apollo-elements/fast@1.1.0) (2020-10-25)
### Features
* **mixins:** query the DOM for variables ([2df637e](https://github.com/apollo-elements/apollo-elements/commit/2df637e1babd35b5e0dc3af9d2de11f03e920938))
# 1.0.0 (2020-10-21)
### Features
* **fast:** implement fast support ([471b80c](https://github.com/apollo-elements/apollo-elements/commit/471b80c85edd8fad10192924fae72cc24f231678)), closes [#78](https://github.com/apollo-elements/apollo-elements/issues/78)
- Updated dependencies [0ccd5682]
- Updated dependencies [b5f2502f]
- @apollo-elements/mixins@4.0.0-next.0

@@ -1,5 +0,5 @@

export { ApolloElement } from './apollo-element';
export { ApolloQuery } from './apollo-query';
export { ApolloMutation } from './apollo-mutation';
export { ApolloSubscription } from './apollo-subscription';
export { ApolloElement } from './apollo-element.js';
export { ApolloQuery } from './apollo-query.js';
export { ApolloMutation } from './apollo-mutation.js';
export { ApolloSubscription } from './apollo-subscription.js';
export * from '@microsoft/fast-element';

@@ -1,6 +0,6 @@

export { ApolloElement } from './apollo-element';
export { ApolloQuery } from './apollo-query';
export { ApolloMutation } from './apollo-mutation';
export { ApolloSubscription } from './apollo-subscription';
export { ApolloElement } from './apollo-element.js';
export { ApolloQuery } from './apollo-query.js';
export { ApolloMutation } from './apollo-mutation.js';
export { ApolloSubscription } from './apollo-subscription.js';
export * from '@microsoft/fast-element';
//# sourceMappingURL=index.js.map
{
"name": "@apollo-elements/fast",
"version": "1.3.0",
"version": "2.0.0-next.0",
"description": "👩‍🚀🌛 FastElements for Apollo GraphQL 🚀👨‍🚀",

@@ -37,6 +37,6 @@ "main": "index.js",

"start": "tsc -w --noEmit",
"analyze": "wca analyze --format json --outFile custom-elements.json",
"analyze": "custom-elements-manifest analyze --fast",
"test": "run-s test:*",
"test:types": "tsc --noEmit",
"test:runtime": "wtr --coverage --config ../../web-test-runner.config.mjs --root-dir '../..' './*.test.ts'"
"test:runtime": "wtr --coverage --config ../../web-test-runner.config.js --root-dir '../..' './*.test.ts'"
},

@@ -67,8 +67,9 @@ "publishConfig": {

"dependencies": {
"@apollo-elements/core": "^0.0.0",
"@apollo-elements/interfaces": "^1.5.0",
"@apollo-elements/mixins": "^3.5.0",
"@microsoft/fast-element": "^0.18.0",
"tslib": "^2.0.3"
"@apollo-elements/mixins": "^4.0.0-next.0",
"@microsoft/fast-element": "^1.4.0",
"tslib": "^2.3.0"
},
"gitHead": "af05e2c9b8f2a6be6942d637da572a6fbee28d4c"
"customElements": "custom-elements.json"
}

@@ -5,3 +5,3 @@ # @apollo-elements/fast

[![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://www.webcomponents.org/element/@apollo-elements/fast)
[![ISC License](https://img.shields.io/npm/l/@apollo-elements/fast)](https://github.com/apollo-elements/apollo-elements/blob/master/LICENCE.md)
[![ISC License](https://img.shields.io/npm/l/@apollo-elements/fast)](https://github.com/apollo-elements/apollo-elements/blob/main/LICENCE.md)
[![Release](https://github.com/apollo-elements/apollo-elements/workflows/Release/badge.svg)](https://github.com/apollo-elements/apollo-elements/actions)

@@ -11,3 +11,3 @@

<strong>👩‍🚀 Launch your app at full speed! 👨‍🚀</strong>
<strong>👩‍🚀 Launch your app at escape velocity! 👨‍🚀</strong>

@@ -14,0 +14,0 @@ > 🔎 Read the [Full API Docs](https://apolloelements.dev/api/libraries/fast/) 🔎

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc