UNPKG

@sample-stack/counter-module-browser

Version:

Sample core for higher packages to depend on

471 lines (470 loc) 12.9 kB
import*as Apollo from'@apollo/client/index.js';const defaultOptions = {}; const AddCounterStateDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "addCounterState" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "amount" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "addCounterState" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "amount" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "amount" } } }], "directives": [{ "kind": "Directive", "name": { "kind": "Name", "value": "client" } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "counter" } }] } }] } }] }; /** * __useAddCounterStateMutation__ * * To run a mutation, you first call `useAddCounterStateMutation` within a React component and pass it any options that fit your needs. * When your component renders, `useAddCounterStateMutation` returns a tuple that includes: * - A mutate function that you can call at any time to execute the mutation * - An object with fields that represent the current status of the mutation's execution * * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; * * @example * const [addCounterStateMutation, { data, loading, error }] = useAddCounterStateMutation({ * variables: { * amount: // value for 'amount' * }, * }); */ function useAddCounterStateMutation(baseOptions) { const options = { ...defaultOptions, ...baseOptions }; return Apollo.useMutation(AddCounterStateDocument, options); } const AddCounterDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "addCounter" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "amount" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "addCounter" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "amount" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "amount" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "amount" } }] } }] } }] }; /** * __useAddCounterMutation__ * * To run a mutation, you first call `useAddCounterMutation` within a React component and pass it any options that fit your needs. * When your component renders, `useAddCounterMutation` returns a tuple that includes: * - A mutate function that you can call at any time to execute the mutation * - An object with fields that represent the current status of the mutation's execution * * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; * * @example * const [addCounterMutation, { data, loading, error }] = useAddCounterMutation({ * variables: { * amount: // value for 'amount' * }, * }); */ function useAddCounterMutation(baseOptions) { const options = { ...defaultOptions, ...baseOptions }; return Apollo.useMutation(AddCounterDocument, options); } const AddCounter_WsDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "AddCounter_WS" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "amount" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "addCounter" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "amount" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "amount" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "amount" } }] } }] } }] }; /** * __useAddCounter_WsMutation__ * * To run a mutation, you first call `useAddCounter_WsMutation` within a React component and pass it any options that fit your needs. * When your component renders, `useAddCounter_WsMutation` returns a tuple that includes: * - A mutate function that you can call at any time to execute the mutation * - An object with fields that represent the current status of the mutation's execution * * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; * * @example * const [addCounterWsMutation, { data, loading, error }] = useAddCounter_WsMutation({ * variables: { * amount: // value for 'amount' * }, * }); */ function useAddCounter_WsMutation(baseOptions) { const options = { ...defaultOptions, ...baseOptions }; return Apollo.useMutation(AddCounter_WsDocument, options); } const SyncCachedCounterDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "SyncCachedCounter" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "syncCachedCounter" } }] } }] }; /** * __useSyncCachedCounterMutation__ * * To run a mutation, you first call `useSyncCachedCounterMutation` within a React component and pass it any options that fit your needs. * When your component renders, `useSyncCachedCounterMutation` returns a tuple that includes: * - A mutate function that you can call at any time to execute the mutation * - An object with fields that represent the current status of the mutation's execution * * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; * * @example * const [syncCachedCounterMutation, { data, loading, error }] = useSyncCachedCounterMutation({ * variables: { * }, * }); */ function useSyncCachedCounterMutation(baseOptions) { const options = { ...defaultOptions, ...baseOptions }; return Apollo.useMutation(SyncCachedCounterDocument, options); } const CounterCacheQueryDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "counterCacheQuery" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "counterCache" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "amount" } }] } }] } }] }; function useCounterCacheQueryLazyQuery(baseOptions) { const options = { ...defaultOptions, ...baseOptions }; return Apollo.useLazyQuery(CounterCacheQueryDocument, options); } const CounterStateDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "CounterState" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "counterState" }, "directives": [{ "kind": "Directive", "name": { "kind": "Name", "value": "client" } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "counter" } }] } }] } }] }; /** * __useCounterStateQuery__ * * To run a query within a React component, call `useCounterStateQuery` and pass it any options that fit your needs. * When your component renders, `useCounterStateQuery` returns an object from Apollo Client that contains loading, error, and data properties * you can use to render your UI. * * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; * * @example * const { data, loading, error } = useCounterStateQuery({ * variables: { * }, * }); */ function useCounterStateQuery(baseOptions) { const options = { ...defaultOptions, ...baseOptions }; return Apollo.useQuery(CounterStateDocument, options); } const CounterQueryDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "counterQuery" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "counter" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "amount" } }] } }] } }] }; /** * __useCounterQueryQuery__ * * To run a query within a React component, call `useCounterQueryQuery` and pass it any options that fit your needs. * When your component renders, `useCounterQueryQuery` returns an object from Apollo Client that contains loading, error, and data properties * you can use to render your UI. * * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; * * @example * const { data, loading, error } = useCounterQueryQuery({ * variables: { * }, * }); */ function useCounterQueryQuery(baseOptions) { const options = { ...defaultOptions, ...baseOptions }; return Apollo.useQuery(CounterQueryDocument, options); }export{AddCounterDocument,AddCounterStateDocument,AddCounter_WsDocument,CounterCacheQueryDocument,CounterQueryDocument,CounterStateDocument,SyncCachedCounterDocument,useAddCounterMutation,useAddCounterStateMutation,useAddCounter_WsMutation,useCounterCacheQueryLazyQuery,useCounterQueryQuery,useCounterStateQuery,useSyncCachedCounterMutation};//# sourceMappingURL=generated-model.js.map