Comments (1)
- Given the following
Nuxt-app/queries/user.gql
mutation addUser($input: UserInput!) {
addUser(input: $input) {
uid
role
name
email
picture
}
}
query getUsers {
users {
uid
role
name
email
picture
}
}
- Usage
<script lang="ts" setup>
// Everything here ( gql functions, their inputs and return types ) should be fully typed
async function addUser() {
const { addUser } = await GqlAddUser({
input: {
name: 'John Doe',
email: '[email protected]'
}
})
// additonal logic
}
async function getUsers() {
const { users } = await GqlGetUsers()
return users
}
</script>
from nuxt-graphql-client.
Related Issues (20)
- GET is used for mutations alongside queries
- Headers are not being taken when using gql functions
- Custom GraphQL type become any, make result types configurable
- trouble with config, cant introspect api
- Is this module currently working properly? HOT 2
- Eliminate `graphql` dependency in production build HOT 5
- graphql-client invalid in nuxt config
- Passing Headers in Gql Functions HOT 3
- hot reload issue HOT 3
- Codegen + fragmants HOT 1
- cant use this for openID connect
- No match found for location with path "/_nuxt/.nuxt/gql.mjs"
- Types broken inside api routes HOT 1
- useGqlHeaders and useGqlHost immutable after first call on SSR HOT 1
- Enhanced codegen config add maybeValue option
- useAsyncGql is not defined HOT 2
- Comparison with @nuxtjs/apollo@next HOT 1
- useGqlToken is not defined HOT 2
- Nuxt generate issues
- batch HTTP link
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nuxt-graphql-client.