GraphQL utilities for solUI:
npm install @solui/graphql
Search for packages by keyword:
const { createApolloClient, SearchQuery } = require('@solui/graphql')
const client = createApolloClient({
endpoint: `https://solui.dev/api/graphql`,
name: 'my-client',
version: '1.0.0',
})
// search for package by keyword
const { data: { search } } = await client.query({
query: SearchQuery,
fetchPolicy: 'cache-and-network',
variables: {
criteria: {
keyword: 'erc20'
}
}
})
// output results
console.log(search)
For a full list of queries please see the GraphQL schema.
## License
Copyright 2019 solUI Contributors
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Stringify given GraphQL request error.
Returns String
Error.
Type: Fragment
Auth token.
Type: Fragment
User.
Type: Fragment
User profile.
Type: Fragment
Login result.
Type: Fragment
Release.
Type: Fragment
Auth token result.
Type: Fragment
Release list.
Type: Fragment
Release result.
Type: Fragment
Release list result.
Type: Fragment
Publish finalization.
Type: Fragment
Publish success.
Type: Fragment
Publish result.
Type: Fragment
Publish-to-chain success.
Type: Fragment
Publish-to-chain result.
Type: Fragment
DappChainInfo.
Type: Fragment
DappChainInfoResult.
Type: Fragment
Create a new Apollo GraphQL client for talking to the solUI API.
Returns ApolloClient
Publish package.
Type: Mutation
Login user.
Type: Mutation
Get all releases.
Type: Query
Get my releases.
Type: Query
Get a release.
Type: Query
Get authentication token.
Type: Query
Get my profile.
Type: Query
Get my profile without authentication (authentation will have to manually provided at call-time).
Type: Query
Get dapp info from on-chain repo.
Type: Query
Get GraphQL type definitions.
Returns GraphQLTypeDef
Build auth headers for sending with GraphpQL requests.
Returns Object Headers as key-value pairs.