GithubHelp home page GithubHelp logo

erenoku / gquery Goto Github PK

View Code? Open in Web Editor NEW

This project forked from leveluptuts/gquery

0.0 1.0 0.0 2.81 MB

Not like jQuery. A GraphQL Fetcher & Cache for Svelte Kit

TypeScript 47.21% JavaScript 12.50% CSS 4.36% HTML 29.33% Svelte 6.61%

gquery's Introduction

gQuery

gQuery

Not like jQuery. The easiest GraphQL Client for Svelte Kit

A different thinking approach to GraphQL and Svelte with built in dev tools and a store first mentality.

  • Automatic Type Generation
  • Automatic store creation
  • Full SSR Support with ease
  • Focus on simplicity
  • Often imitated never duplicated

Just write .graphql and go

For all docs and usage see: https://gquery.leveluptutorials.com

<script context="module" lang="ts">
	// The generated function that fetches and caches
	import { getCurrentUser, currenUser } from './UserQueries.gq';
	// data available for ssr
	// correctly ts typed and all
	// $: console.log($currentUser.user) //data available for ssr

	export async function load({ fetch }) {
		// Runs the cache/fetch function populating $gCache before use.
		await getCurrentUser({
			variables: { limit: 0 },
			fetch
		});
		return {};
	}
</script>

<p>Current user: {$currentUser.user._id}</p>

gquery's People

Contributors

stolinski avatar csellis avatar rmarscher avatar timscodebase avatar

Watchers

 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.