We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What codegen plugins would be best to combine with Villus?
For example is it compatible with the output of @graphql-codegen/typescript-vue-apollo
@graphql-codegen/typescript-vue-apollo
The text was updated successfully, but these errors were encountered:
Unfortunately, I don't think it is compatible with @graphql-codegen/typescript-vue-apollo output
However, we do use the near-operation-preset along with typescript-operation plugin to generate .gql defenitions.
near-operation-preset
typescript-operation
.gql
Here is a snippet of the codegen.yml:
codegen.yml
schema: https://yourapi.com/graphql documents: - ./graphql/**/*.gql generates: ./graphql-types.gen.ts: plugins: - typescript ./: preset: near-operation-file presetConfig: extension: .gql.d.ts baseTypesPath: graphql-types.gen.ts plugins: - typescript-operations config: addOperationExport: true
Which provides typings for our schema and for the operations we use with graphql-tag.
graphql-tag
Here is an example of a query:
import { ProductsQuery, ProductsQueryVariables, Products } from '@/graphql/Product.gql'; const { data, error } = useQuery<ProductsQuery, ProductsQueryVariables>({ query: Products, variables, });
Maybe in the future, I could implement a plugin to automate this like the one you suggested for vue-apollo but I'm short on time at the moment.
vue-apollo
Sorry, something went wrong.
No branches or pull requests
What codegen plugins would be best to combine with Villus?
For example is it compatible with the output of
@graphql-codegen/typescript-vue-apollo
The text was updated successfully, but these errors were encountered: