GithubHelp home page GithubHelp logo

heywhy / vite-graphql-setup Goto Github PK

View Code? Open in Web Editor NEW
32.0 5.0 4.0 744 KB

This is a project template for Vue using Vite, GraphQL with VueApollo, Tailwindcss, Vue-Router, and Vue Testing Library

Shell 0.94% JavaScript 40.59% HTML 1.63% Vue 8.13% TypeScript 47.12% CSS 1.59%
graphql graphql-codegen graphql-support vite vue-apollo vuejs tailwind mutations hooks typescript

vite-graphql-setup's Introduction

Description

This repository contains a basic setup for Tailwind, Vue 3 using Vite for bundling and also a basic structure for GraphQL support using Vue Apollo

Technologies

Quality Controls

Scripts

  • build: build codebase for deployment.
  • codegen: generate typescript types from GraphQL api.
  • dev: run project in dev mode.
  • prettier:check: check codebase for files not formatted.
  • prettier:write: format the codebase.
  • test: runs tests defined in tests and _test_ folder in the project.
  • test:coverage: runs tests with coverage report.

Folder Structure

src/css

Applications stylesheets should be placed here.

src/components

Reusable components used throughout the application should be situated here.

src/hooks

You should place your application hooks in this folder with the advent of Composition API in Vue 3.

src/pages

This folder contains your application pages.

src/graphql

This folder contains everything regarding the graphql setup, queries, mutations and also files generated by GraphQL Codegen when you run yarn codegen

src/graphql/queries

Queries for each GraphQL types should be placed in here. Example, your GraphQL API has a User type and you need to write queries for that type, you should create a corresponding file user.ts and write your queries in the file/module.

src/graphql/mutations

The same convention that exists for GraphQL queries should be used for mutations also.

ℹī¸ Information
You should read up on Vite to give you an overview of how this folders (/public/,/src/assets) are used.

Recommended VSCode Extensions

TODO

  • GraphQL testing support
  • E2E using Cypress (Gherkins & Cucumber)

vite-graphql-setup's People

Contributors

heywhy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤ī¸ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.