1.0.5 • Published 3 years ago

@use-lens/react-apollo v1.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

@use-lens/react-apollo

Lens API generated code for Apollo Client in React.

āš ļø CAUTION

🌿 https://docs.lens.xyz/docs/introduction:

This API is beta and not production complete yet, which means that we could change schemas and endpoints at any time without warning or notice to you. When this API is production ready, we will remove this beta warning and will endeavor to ensure that there are no changes going forward unless a major change to the protocol itself is required.

Lens API is not production complete, and so is @use-lens/*. Please, keep this in mind when going to production.

In case of breaking changes, please, visit main README.md's FAQ

There is an explanation of how I see the best use of @use-lens/* at this point in the main README.md

šŸ¤“ Usage

All packages and CLI have 2 versions/dist-tags: @testnet and @latest. Install @testnet version only if you need some functionality from it(currently, it is only createProfile).

  • Install package
npm install --save @use-lens/react-apollo
import {
  useAuthenticateMutation,
  useChallengeLazyQuery,
  useGlobalProtocolStatsQuery
} from '@use-lens/react-apollo';

const SomeComponent = () => {
  // component's code
  const [loadChallenge] = useChallengeLazyQuery();
  const [authenticate] = useAuthenticateMutation();

  const { data, error, loading } = useGlobalProtocolStatsQuery();
  
  return // render data from Lens API.
}

Workflow

  • decide what you want to implement
  • go to 🌿 https://docs.lens.xyz to check what query or mutation you need to use
  • import from @use-lens/react-apollo what you need
    • document(query or mutation)
    • request /response types

Detailed information about what is produced can be found here:

https://www.the-guild.dev/graphql/codegen/plugins/typescript/typescript-react-apollo

šŸ‘Øā€šŸ« Example

https://github.com/use-lens/use-lens/tree/main/examples/react-apollo

šŸ”Ž LICENSE

MIT. The full license text can be found in the LICENSE file.

...The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

ā² Last update

2022/12/07

1.0.3-testnet.0

3 years ago

1.0.5-testnet.0

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.4-testnet.0

3 years ago

1.0.2

3 years ago

1.0.2-testnet.0

3 years ago

1.0.1

3 years ago

1.0.1-testnet.0

3 years ago

1.0.0

3 years ago

1.0.0-testnet.0

3 years ago

0.0.10

3 years ago

0.0.10-testnet.0

3 years ago

0.0.9

3 years ago

0.0.9-testnet.0

3 years ago

0.0.8

3 years ago

0.0.8-testnet.0

3 years ago

0.0.7

3 years ago

0.0.7-testnet.0

3 years ago

0.0.6

3 years ago

0.0.1-alpha.11

3 years ago

0.0.1-alpha.9

3 years ago

0.0.1-alpha.8

3 years ago

0.0.1-alpha.5

3 years ago

0.0.1-alpha.3

3 years ago