UNPKG

@apollo-elements/fast

Version:

šŸ‘©ā€šŸš€šŸŒ› FastElements for Apollo GraphQL šŸš€šŸ‘Øā€šŸš€

1,676 lines • 181 kB
{ "schemaVersion": "1.0.0", "readme": "", "modules": [ { "kind": "javascript-module", "path": "apollo-mutation-behavior.js", "declarations": [ { "kind": "class", "description": "`ApolloMutationBehavior`\n\nšŸš€ FAST Behavior that connects to your Apollo cache.", "name": "ApolloMutationBehavior", "members": [ { "kind": "field", "name": "variables" }, { "kind": "method", "name": "bind", "parameters": [ { "name": "_source" }, { "name": "_context" } ] }, { "kind": "method", "name": "unbind", "parameters": [ { "name": "_source" } ] }, { "kind": "field", "name": "hostElement", "default": "hostElement" }, { "kind": "field", "name": "data", "type": { "text": "null" }, "description": "Latest query data.", "default": "null" }, { "kind": "field", "name": "called", "type": { "text": "boolean" }, "default": "false" }, { "kind": "field", "name": "loading", "type": { "text": "boolean" }, "default": "false" }, { "kind": "field", "name": "error", "type": { "text": "null" }, "default": "null" }, { "kind": "field", "name": "errors", "type": { "text": "array" }, "default": "[]" } ], "superclass": { "name": "AMC", "package": "@apollo-elements/core/apollo-mutation-controller" } } ], "exports": [ { "kind": "js", "name": "ApolloMutationBehavior", "declaration": { "name": "ApolloMutationBehavior", "module": "apollo-mutation-behavior.js" } } ] }, { "kind": "javascript-module", "path": "apollo-mutation-behavior.js", "declarations": [ { "kind": "class", "description": "`ApolloMutationBehavior`\n\nšŸš€ FAST Behavior that connects to your Apollo cache.", "name": "ApolloMutationBehavior", "members": [ { "kind": "field", "name": "data", "type": { "text": "Data<D> | null" }, "default": "null", "description": "Latest query data." }, { "kind": "field", "name": "called", "type": { "text": "boolean" }, "default": "false" }, { "kind": "field", "name": "loading", "type": { "text": "boolean" }, "default": "false" }, { "kind": "field", "name": "error", "type": { "text": "null" }, "default": "null" }, { "kind": "field", "name": "errors", "type": { "text": "array" }, "default": "[]" }, { "kind": "field", "name": "variables", "type": { "text": "Variables<D, V> | null" } }, { "kind": "method", "name": "bind", "return": { "type": { "text": "void" } }, "parameters": [ { "name": "_source", "type": { "text": "FASTElement & HTMLElement" } }, { "name": "_context", "type": { "text": "ExecutionContext" } } ] }, { "kind": "method", "name": "unbind", "return": { "type": { "text": "void" } }, "parameters": [ { "name": "_source", "type": { "text": "FASTElement" } } ] } ], "superclass": { "name": "AMC", "package": "@apollo-elements/core/apollo-mutation-controller" } } ], "exports": [ { "kind": "js", "name": "ApolloMutationBehavior", "declaration": { "name": "ApolloMutationBehavior", "module": "apollo-mutation-behavior.js" } } ] }, { "kind": "javascript-module", "path": "apollo-query-behavior.js", "declarations": [ { "kind": "class", "description": "`ApolloQueryBehavior`\n\nšŸš€ FAST Behavior that connects to your Apollo cache.", "name": "ApolloQueryBehavior", "members": [ { "kind": "field", "name": "variables" }, { "kind": "method", "name": "bind", "parameters": [ { "name": "_source" }, { "name": "_context" } ] }, { "kind": "method", "name": "unbind", "parameters": [ { "name": "_source" } ] }, { "kind": "field", "name": "data", "type": { "text": "null" }, "description": "Latest query data.", "default": "null" }, { "kind": "field", "name": "loading", "type": { "text": "boolean" }, "default": "false" }, { "kind": "field", "name": "error", "type": { "text": "null" }, "default": "null" }, { "kind": "field", "name": "errors", "type": { "text": "array" }, "default": "[]" } ], "superclass": { "name": "ApolloQueryController", "package": "@apollo-elements/core/apollo-query-controller" } } ], "exports": [ { "kind": "js", "name": "ApolloQueryBehavior", "declaration": { "name": "ApolloQueryBehavior", "module": "apollo-query-behavior.js" } } ] }, { "kind": "javascript-module", "path": "apollo-query-behavior.js", "declarations": [ { "kind": "class", "description": "`ApolloQueryBehavior`\n\nšŸš€ FAST Behavior that connects to your Apollo cache.", "name": "ApolloQueryBehavior", "members": [ { "kind": "field", "name": "data", "type": { "text": "Data<D> | null" }, "default": "null", "description": "Latest query data." }, { "kind": "field", "name": "loading", "type": { "text": "boolean" }, "default": "false" }, { "kind": "field", "name": "error", "type": { "text": "null" }, "default": "null" }, { "kind": "field", "name": "errors", "type": { "text": "array" }, "default": "[]" }, { "kind": "field", "name": "variables", "type": { "text": "Variables<D, V> | null" } }, { "kind": "method", "name": "bind", "return": { "type": { "text": "void" } }, "parameters": [ { "name": "_source", "type": { "text": "FASTElement & HTMLElement" } }, { "name": "_context", "type": { "text": "ExecutionContext" } } ] }, { "kind": "method", "name": "unbind", "return": { "type": { "text": "void" } }, "parameters": [ { "name": "_source", "type": { "text": "FASTElement" } } ] } ], "superclass": { "name": "ApolloQueryController", "package": "@apollo-elements/core/apollo-query-controller" } } ], "exports": [ { "kind": "js", "name": "ApolloQueryBehavior", "declaration": { "name": "ApolloQueryBehavior", "module": "apollo-query-behavior.js" } } ] }, { "kind": "javascript-module", "path": "apollo-subscription-behavior.js", "declarations": [ { "kind": "class", "description": "`ApolloSubscriptionBehavior`\n\nšŸš€ FAST Behavior that connects to your Apollo cache.", "name": "ApolloSubscriptionBehavior", "members": [ { "kind": "field", "name": "variables" }, { "kind": "method", "name": "bind", "parameters": [ { "name": "_source" }, { "name": "_context" } ] }, { "kind": "method", "name": "unbind", "parameters": [ { "name": "_source" } ] }, { "kind": "field", "name": "data", "type": { "text": "null" }, "description": "Latest query data.", "default": "null" }, { "kind": "field", "name": "loading", "type": { "text": "boolean" }, "default": "false" }, { "kind": "field", "name": "error", "type": { "text": "null" }, "default": "null" }, { "kind": "field", "name": "errors", "type": { "text": "array" }, "default": "[]" } ], "superclass": { "name": "ApolloSubscriptionController", "package": "@apollo-elements/core/apollo-subscription-controller" } } ], "exports": [ { "kind": "js", "name": "ApolloSubscriptionBehavior", "declaration": { "name": "ApolloSubscriptionBehavior", "module": "apollo-subscription-behavior.js" } } ] }, { "kind": "javascript-module", "path": "apollo-subscription-behavior.js", "declarations": [ { "kind": "class", "description": "`ApolloSubscriptionBehavior`\n\nšŸš€ FAST Behavior that connects to your Apollo cache.", "name": "ApolloSubscriptionBehavior", "members": [ { "kind": "field", "name": "data", "type": { "text": "Data<D> | null" }, "default": "null", "description": "Latest query data." }, { "kind": "field", "name": "loading", "type": { "text": "boolean" }, "default": "false" }, { "kind": "field", "name": "error", "type": { "text": "null" }, "default": "null" }, { "kind": "field", "name": "errors", "type": { "text": "array" }, "default": "[]" }, { "kind": "field", "name": "variables", "type": { "text": "Variables<D, V> | null" } }, { "kind": "method", "name": "bind", "return": { "type": { "text": "void" } }, "parameters": [ { "name": "_source", "type": { "text": "FASTElement & HTMLElement" } }, { "name": "_context", "type": { "text": "ExecutionContext" } } ] }, { "kind": "method", "name": "unbind", "return": { "type": { "text": "void" } }, "parameters": [ { "name": "_source", "type": { "text": "FASTElement" } } ] } ], "superclass": { "name": "ApolloSubscriptionController", "package": "@apollo-elements/core/apollo-subscription-controller" } } ], "exports": [ { "kind": "js", "name": "ApolloSubscriptionBehavior", "declaration": { "name": "ApolloSubscriptionBehavior", "module": "apollo-subscription-behavior.js" } } ] }, { "kind": "javascript-module", "path": "fast-controller-host.js", "declarations": [ { "kind": "class", "description": "", "name": "FASTControllerHost", "members": [ { "kind": "field", "name": "#controllers", "privacy": "private", "default": "new Set()" }, { "kind": "method", "name": "addController", "parameters": [ { "name": "controller" } ] }, { "kind": "method", "name": "removeController", "parameters": [ { "name": "controller" } ] }, { "kind": "method", "name": "requestUpdate", "description": "Shouldn't need an implementation, since FAST's reactivity model is pull-based" }, { "kind": "field", "name": "updateComplete", "readonly": true }, { "kind": "field", "name": "$fastElement", "default": "$fastElement" } ] } ], "exports": [ { "kind": "js", "name": "FASTControllerHost", "declaration": { "name": "FASTControllerHost", "module": "fast-controller-host.js" } } ] }, { "kind": "javascript-module", "path": "fast-controller-host.js", "declarations": [ { "kind": "class", "description": "", "name": "FASTControllerHost", "members": [ { "kind": "field", "name": "#controllers", "privacy": "private", "default": "new Set<ReactiveController>()" }, { "kind": "method", "name": "addController", "return": { "type": { "text": "void" } }, "parameters": [ { "name": "controller", "type": { "text": "ReactiveController" } } ] }, { "kind": "method", "name": "removeController", "return": { "type": { "text": "void" } }, "parameters": [ { "name": "controller", "type": { "text": "ReactiveController" } } ] }, { "kind": "method", "name": "requestUpdate", "return": { "type": { "text": "void" } }, "description": "Shouldn't need an implementation, since FAST's reactivity model is pull-based" }, { "kind": "field", "name": "updateComplete", "type": { "text": "Promise<boolean>" }, "readonly": true } ] } ], "exports": [ { "kind": "js", "name": "FASTControllerHost", "declaration": { "name": "FASTControllerHost", "module": "fast-controller-host.js" } } ] }, { "kind": "javascript-module", "path": "index.js", "declarations": [], "exports": [ { "kind": "js", "name": "ApolloQueryBehavior", "declaration": { "name": "ApolloQueryBehavior", "module": "./apollo-query-behavior.js" } }, { "kind": "js", "name": "ApolloMutationBehavior", "declaration": { "name": "ApolloMutationBehavior", "module": "./apollo-mutation-behavior.js" } }, { "kind": "js", "name": "ApolloSubscriptionBehavior", "declaration": { "name": "ApolloSubscriptionBehavior", "module": "./apollo-subscription-behavior.js" } }, { "kind": "js", "name": "ApolloQuery", "declaration": { "name": "ApolloQuery", "module": "./bases/apollo-query.js" } }, { "kind": "js", "name": "ApolloMutation", "declaration": { "name": "ApolloMutation", "module": "./bases/apollo-mutation.js" } }, { "kind": "js", "name": "ApolloSubscription", "declaration": { "name": "ApolloSubscription", "module": "./bases/apollo-subscription.js" } }, { "kind": "js", "name": "*", "declaration": { "name": "*", "package": "@microsoft/fast-element" } } ] }, { "kind": "javascript-module", "path": "index.js", "declarations": [], "exports": [ { "kind": "js", "name": "ApolloQueryBehavior", "declaration": { "name": "ApolloQueryBehavior", "module": "./apollo-query-behavior.js" } }, { "kind": "js", "name": "ApolloMutationBehavior", "declaration": { "name": "ApolloMutationBehavior", "module": "./apollo-mutation-behavior.js" } }, { "kind": "js", "name": "ApolloSubscriptionBehavior", "declaration": { "name": "ApolloSubscriptionBehavior", "module": "./apollo-subscription-behavior.js" } }, { "kind": "js", "name": "ApolloQuery", "declaration": { "name": "ApolloQuery", "module": "./bases/apollo-query.js" } }, { "kind": "js", "name": "ApolloMutation", "declaration": { "name": "ApolloMutation", "module": "./bases/apollo-mutation.js" } }, { "kind": "js", "name": "ApolloSubscription", "declaration": { "name": "ApolloSubscription", "module": "./bases/apollo-subscription.js" } }, { "kind": "js", "name": "*", "declaration": { "name": "*", "package": "@microsoft/fast-element" } } ] }, { "kind": "javascript-module", "path": "bases/apollo-element.d.js", "declarations": [ { "kind": "class", "description": "`ApolloElement`\n\nšŸš€ Single-operation custom-element base class for Apollo FAST elements.\n\nSee [`ApolloElementInterface`](https://apolloelements.dev/api/core/interfaces/element) for more information on events", "name": "ApolloElement", "members": [ { "kind": "field", "name": "controller", "type": { "text": "ApolloController<D, V>" } }, { "kind": "field", "name": "readyToReceiveDocument", "type": { "text": "boolean" } }, { "kind": "field", "name": "client", "type": { "text": "C.ApolloClient<C.NormalizedCacheObject> | null" }, "summary": "The Apollo Client instance", "description": "" }, { "kind": "field", "name": "document", "type": { "text": "ComponentDocument<D, V> | null" }, "summary": "Operation document.\nGraphQL operation document i.e. query, subscription, or mutation.\nMust be a parsed GraphQL `DocumentNode`", "description": "" }, { "kind": "field", "name": "context", "type": { "text": "Record<string, unknown> | undefined" }, "summary": "Context passed to the link execution chain.", "description": "" }, { "kind": "field", "name": "loading", "type": { "text": "boolean" }, "summary": "Whether a request is in flight.", "description": "" }, { "kind": "field", "name": "data", "type": { "text": "Data<D> | null" }, "summary": "Latest Data.", "description": "" }, { "kind": "field", "name": "variables", "type": { "text": "Variables<D, V> | null" }, "summary": "Operation variables.", "description": "" }, { "kind": "field", "name": "error", "type": { "text": "Error | C.ApolloError | null" }, "summary": "Latest error", "description": "" }, { "kind": "field", "name": "errors", "type": { "text": "readonly GraphQLError[]" }, "summary": "Latest errors", "description": "" } ], "superclass": { "name": "FASTElement", "package": "@microsoft/fast-element" }, "tagName": "", "customElement": true } ], "exports": [ { "kind": "js", "name": "ApolloElement", "declaration": { "name": "ApolloElement", "module": "bases/apollo-element.d.js" } } ] }, { "kind": "javascript-module", "path": "bases/apollo-element.js", "declarations": [ { "kind": "class", "description": "`ApolloElement`\n\nšŸš€ Single-operation custom-element base class for Apollo FAST elements.\n\nSee [`ApolloElementInterface`](https://apolloelements.dev/api/core/interfaces/element) for more information on events", "name": "ApolloElement", "members": [ { "kind": "field", "name": "readyToReceiveDocument", "type": { "text": "boolean" }, "default": "false" }, { "kind": "field", "name": "client", "summary": "The Apollo Client instance" }, { "kind": "field", "name": "document", "type": { "text": "null" }, "summary": "Operation document.\nGraphQL operation document i.e. query, subscription, or mutation.\nMust be a parsed GraphQL `DocumentNode`", "default": "null" }, { "kind": "field", "name": "loading", "type": { "text": "boolean" }, "summary": "Whether a request is in flight.", "default": "false" }, { "kind": "field", "name": "data", "type": { "text": "null" }, "summary": "Latest Data.", "default": "null" }, { "kind": "field", "name": "variables", "type": { "text": "null" }, "summary": "Operation variables.", "default": "null" }, { "kind": "field", "name": "error", "type": { "text": "null" }, "summary": "Latest error", "default": "null" }, { "kind": "field", "name": "errors", "type": { "text": "array" }, "summary": "Latest errors", "default": "[]" } ], "events": [ { "name": "apollo-element-connected", "type": { "text": "ApolloElementEvent" } }, { "name": "apollo-element-disconnected", "type": { "text": "ApolloElementEvent" } } ], "superclass": { "name": "FASTElement", "package": "@microsoft/fast-element" }, "tagName": "", "customElement": true } ], "exports": [ { "kind": "js", "name": "ApolloElement", "declaration": { "name": "ApolloElement", "module": "bases/apollo-element.js" } } ] }, { "kind": "javascript-module", "path": "bases/apollo-element.test.d.js", "declarations": [], "exports": [] }, { "kind": "javascript-module", "path": "bases/apollo-element.js", "declarations": [ { "kind": "class", "description": "`ApolloElement`\n\nšŸš€ Single-operation custom-element base class for Apollo FAST elements.\n\nSee [`ApolloElementInterface`](https://apolloelements.dev/api/core/interfaces/element) for more information on events", "name": "ApolloElement", "members": [ { "kind": "field", "name": "controller", "type": { "text": "ApolloController<D, V>" } }, { "kind": "field", "name": "readyToReceiveDocument", "type": { "text": "boolean" }, "default": "false" }, { "kind": "field", "name": "client", "type": { "text": "C.ApolloClient<C.NormalizedCacheObject> | null" }, "summary": "The Apollo Client instance", "description": "" }, { "kind": "field", "name": "document", "type": { "text": "ComponentDocument<D, V> | null" }, "default": "null", "summary": "Operation document.\nGraphQL operation document i.e. query, subscription, or mutation.\nMust be a parsed GraphQL `DocumentNode`", "description": "" }, { "kind": "field", "name": "context", "type": { "text": "Record<string, unknown> | undefined" }, "summary": "Context passed to the link execution chain.", "description": "" }, { "kind": "field", "name": "loading", "type": { "text": "boolean" }, "default": "false", "summary": "Whether a request is in flight.", "description": "" }, { "kind": "field", "name": "data", "type": { "text": "Data<D> | null" }, "default": "null", "summary": "Latest Data.", "description": "" }, { "kind": "field", "name": "variables", "type": { "text": "Variables<D, V> | null" }, "default": "null", "summary": "Operation variables.", "description": "" }, { "kind": "field", "name": "error", "type": { "text": "Error | C.ApolloError | null" }, "default": "null", "summary": "Latest error", "description": "" }, { "kind": "field", "name": "errors", "type": { "text": "readonly GraphQLError[]" }, "default": "[]", "summary": "Latest errors", "description": "" } ], "events": [ { "name": "apollo-element-connected", "type": { "text": "ApolloElementEvent" } }, { "name": "apollo-element-disconnected", "type": { "text": "ApolloElementEvent" } } ], "superclass": { "name": "FASTElement", "package": "@microsoft/fast-element" }, "tagName": "", "customElement": true } ], "exports": [ { "kind": "js", "name": "ApolloElement", "declaration": { "name": "ApolloElement", "module": "bases/apollo-element.js" } } ] }, { "kind": "javascript-module", "path": "bases/apollo-mutation.d.js", "declarations": [ { "kind": "class", "description": "`ApolloMutation`\n\nšŸ‘©ā€šŸš€ FASTElement base class to issue mutations via your Apollo cache.\n\nSee [`ApolloMutationInterface`](https://apolloelements.dev/api/core/interfaces/mutation) for more information on events", "name": "ApolloMutation", "members": [ { "kind": "field", "name": "data", "type": { "text": "Data<D> | null" }, "default": "null", "summary": "Latest mutation data.", "description": "", "inheritedFrom": { "name": "ApolloElement", "module": "bases/apollo-element.js" } }, { "kind": "field", "name": "variables", "type": { "text": "Variables<D, V> | null" }, "default": "null", "summary": "Mutation variables.", "description": "An object that maps from the name of a variable as used in the mutation GraphQL document to that variable's value.", "inheritedFrom": { "name": "ApolloElement", "module": "bases/apollo-element.js" } }, { "kind": "field", "name": "controller", "type": { "text": "ApolloController<D, V>" }, "inheritedFrom": { "name": "ApolloElement", "module": "bases/apollo-element.js" } }, { "kind": "field", "name": "called", "type": { "text": "boolean" }, "summary": "Whether the mutation was called", "description": "" }, { "kind": "field", "name": "mutation", "type": { "text": "ComponentDocument<D, V> | null" }, "summary": "The mutation.", "description": "" }, { "kind": "field", "name": "optimisticResponse", "type": { "text": "OptimisticResponseType<D, V> | undefined" }, "description": "An object that represents the result of this mutation that will be optimistically\nstored before the server has actually returned a result, or a unary function that\ntakes the mutation's variables and returns such an object.\n\nThis is most often used for optimistic UI, where we want to be able to see\nthe result of a mutation immediately, and update the UI later if any errors\nappear.\n\n### Examples\n\n<figure class=\"example\"><figcaption>Using a function</figcaption>\n\n```ts\nelement.optimisticResponse = ({ name }: HelloMutationVariables) => ({\n __typename: 'Mutation',\n hello: {\n __typename: 'Greeting',\n name,\n },\n});\n```\n\n</figure>" }, { "kind": "field", "name": "ignoreResults", "type": { "text": "boolean" }, "summary": "If true, the returned data property will not update with the mutation result.", "description": "" }, { "kind": "field", "name": "awaitRefetchQueries", "type": { "text": "boolean | undefined" }, "description": "Queries refetched as part of refetchQueries are handled asynchronously,\nand are not waited on before the mutation is completed (resolved).\nSetting this to true will make sure refetched queries are completed\nbefore the mutation is considered done. false by default.", "attribute": "await-refetch-queries" }, { "kind": "field", "name": "errorPolicy", "type": { "text": "C.ErrorPolicy | undefined" }, "description": "Specifies the ErrorPolicy to be used for this mutation.", "attribute": "error-policy" }, { "kind": "field", "name": "fetchPolicy", "type": { "text": "'no-cache' | undefined" }, "description": "Specifies the FetchPolicy to be used for this mutation.", "attribute": "fetch-policy" }, { "kind": "field", "name": "refetchQueries", "type": { "text": "RefetchQueriesType<D> | null" }, "description": "As an attribute, can be a string of comma-separated query names\n```html\n<mutation-element refetch-queries=\"QueryA, QueryB,QueryC\"></mutation-element>\n```\nAs a property, you can pass any legal `refetchQueries` value." }, { "kind": "method", "name": "updater", "return": { "type": { "text": "ReturnType<MutationUpdaterFn<Data<D>, Variables<D, V>>>" } }, "parameters": [ { "name": "params", "type": { "text": "Parameters<MutationUpdaterFn<Data<D>, Variables<D, V>>>" } } ], "description": "A function which updates the apollo cache when the query responds.\nThis function will be called twice over the lifecycle of a mutation.\nOnce at the very beginning if an optimisticResponse was provided.\nThe writes created from the optimistic data will be rolled back before\nthe second time this function is called which is when the mutation has\nsuccesfully resolved. At that point update will be called with the actual\nmutation result and those writes will not be rolled back.\n\nThe reason a DataProxy is provided instead of the user calling the methods\ndirectly on ApolloClient is that all of the writes are batched together at\nthe end of the update, and it allows for writes generated by optimistic\ndata to be rolled back." }, { "kind": "method", "name": "mutate", "return": { "type": { "text": "Promise<C.FetchResult<Data<D>>>" } }, "parameters": [ { "name": "params", "optional": true, "type": { "text": "Partial<C.MutationOptions<Data<D>, Variables<D, V>>>" } } ] }, { "kind": "method", "name": "onCompleted", "return": { "type": { "text": "void" } }, "parameters": [ { "name": "data", "type": { "text": "Data<D> | null" } } ], "description": "Callback for when a mutation is completed." }, { "kind": "method", "name": "onError", "return": { "type": { "text": "void" } }, "parameters": [ { "name": "error", "type": { "text": "Error" } } ], "description": "Callback for when an error occurs in mutation." }, { "kind": "field", "name": "readyToReceiveDocument", "type": { "text": "boolean" }, "default": "false", "inheritedFrom": { "name": "ApolloElement", "module": "bases/apollo-element.js" } }, { "kind": "field", "name": "client", "type": { "text": "C.ApolloClient<C.NormalizedCacheObject> | null" }, "summary": "The Apollo Client instance", "description": "", "inheritedFrom": { "name": "ApolloElement", "module": "bases/apollo-element.js" } }, { "kind": "field", "name": "document", "type": { "text": "ComponentDocument<D, V> | null" }, "default": "null", "summary": "Operation document.\nGraphQL operation document i.e. query, subscription, or mutation.\nMust be a parsed GraphQL `DocumentNode`", "description": "", "inheritedFrom": { "name": "ApolloElement", "module": "bases/apollo-element.js" } }, { "kind": "field", "name": "context", "type": { "text": "Record<string, unknown> | undefined" }, "summary": "Context passed to the link execution chain.", "description": "", "inheritedFrom": { "name": "ApolloElement", "module": "bases/apollo-element.js" } }, { "kind": "field", "name": "loading", "type": { "text": "boolean" }, "default": "false", "summary": "Whether a request is in flight.", "description": "", "inheritedFrom": { "name": "ApolloElement", "module": "bases/apollo-element.js" } }, { "kind": "field", "name": "error", "type": { "text": "Error | C.ApolloError | null" }, "default": "null", "summary": "Latest error", "description": "", "inheritedFrom": { "name": "ApolloElement", "module": "bases/apollo-element.js" } }, { "kind": "field", "name": "errors", "type": { "text": "readonly GraphQLError[]" }, "default": "[]", "summary": "Latest errors", "description": "", "inheritedFrom": { "name": "ApolloElement", "module": "bases/apollo-element.js" } } ], "attributes": [ { "name": "await-refetch-queries", "type": { "text": "boolean | undefined" }, "description": "Queries refetched as part of refetchQueries are handled asynchronously,\nand are not waited on before the mutation is completed (resolved).\nSetting this to true will make sure refetched queries are completed\nbefore the mutation is considered done. false by default.", "fieldName": "awaitRefetchQueries" }, { "name": "error-policy", "type": { "text": "C.ErrorPolicy | undefined" }, "description": "Specifies the ErrorPolicy to be used for this mutation.", "fieldName": "errorPolicy" }, { "name": "fetch-policy", "type": { "text": "'no-cache' | undefined" }, "description": "Specifies the FetchPolicy to be used for this mutation.", "fieldName": "fetchPolicy" } ], "superclass": { "name": "ApolloElement", "module": "/bases/apollo-element.js" }, "tagName": "", "events": [ { "name": "apollo-element-connected", "type": { "text": "ApolloElementEvent" }, "inheritedFrom": { "name": "ApolloElement", "module": "bases/apollo-element.ts" } }, { "name": "apollo-element-disconnected", "type": { "text": "ApolloElementEvent" }, "inheritedFrom": { "name": "ApolloElement", "module": "bases/apollo-element.ts" } } ] } ], "exports": [ { "kind": "js", "name": "ApolloMutation", "declaration": { "name": "ApolloMutation", "module": "bases/apollo-mutation.d.js" } } ] }, { "kind": "javascript-module", "path": "bases/apollo-mutation.js", "declarations": [ { "kind": "class", "description": "`ApolloMutation`\n\nšŸ‘©ā€šŸš€ FASTElement base class to issue mutations via your Apollo cache.\n\nSee [`ApolloMutationInterface`](https://apolloelements.dev/api/core/interfaces/mutation) for more information on events", "name": "ApolloMutation", "members": [ { "kind": "method", "name": "mutate", "parameters": [ { "name": "params" } ] }, { "kind": "field", "name": "controller", "type": { "text": "ApolloController<D, V>" }, "default": "new ApolloMutationBehavior(this, null, {\n onCompleted: data => this.onCompleted?.(data),\n onError: error => this.onError?.(error)\n /* c8 ignore next */\n // covered\n\n })", "inheritedFrom": { "name": "ApolloElement", "module": "bases/apollo-element.js" } }, { "kind": "field", "name": "called", "type": { "text": "boolean" }, "summary": "Whether the mutation was called", "default": "false" }, { "kind": "field", "name": "mutation", "type": { "text": "null" }, "summary": "The mutation.", "default": "null" }, { "kind": "field", "name": "ignoreResults", "type": { "text": "boolean" }, "summary": "If true, the returned data property will not update with the mutation result.", "default": "false" }, { "kind": "field", "name": "refetchQueries", "type": { "text": "null" }, "description": "As an attribute, can be a string of comma-separated query names\n```html\n<mutation-element refetch-queries=\"QueryA, QueryB,QueryC\"></mutation-element>\n```\nAs a property, you can pass any legal `refetchQueries` value.", "default": "null" }, { "kind": "field", "name": "readyToReceiveDocument", "type": { "text": "boolean" }, "default": "false", "inheritedFrom": { "name": "ApolloElement", "module": "bases/apollo-element.js" } }, { "kind": "field", "name": "client", "type": { "text": "C.ApolloClient<C.NormalizedCacheObject> | null" }, "summary": "The Apollo Client instance", "description": "", "inheritedFrom": { "na