{"id":16231916,"url":"https://github.com/praveenweb/swr-graphql","last_synced_at":"2025-03-16T12:32:15.153Z","repository":{"id":42968712,"uuid":"220407990","full_name":"praveenweb/swr-graphql","owner":"praveenweb","description":"A sample Next.js app using Zeit's SWR React Hooks to make GraphQL Queries/Mutations/Subscriptions","archived":false,"fork":false,"pushed_at":"2022-11-19T00:55:21.000Z","size":178,"stargazers_count":124,"open_issues_count":7,"forks_count":15,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-27T08:54:41.491Z","etag":null,"topics":["graphql","nextjs","swr","swr-graphql","zeit"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/praveenweb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-08T07:10:34.000Z","updated_at":"2024-04-02T15:00:02.000Z","dependencies_parsed_at":"2023-01-21T19:46:32.135Z","dependency_job_id":null,"html_url":"https://github.com/praveenweb/swr-graphql","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/praveenweb%2Fswr-graphql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/praveenweb%2Fswr-graphql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/praveenweb%2Fswr-graphql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/praveenweb%2Fswr-graphql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/praveenweb","download_url":"https://codeload.github.com/praveenweb/swr-graphql/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243814880,"owners_count":20352037,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["graphql","nextjs","swr","swr-graphql","zeit"],"created_at":"2024-10-10T13:07:09.204Z","updated_at":"2025-03-16T12:32:14.891Z","avatar_url":"https://github.com/praveenweb.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# swr-graphql\n\n## The Idea behind the Example\n\nThis is a sample app demonstrating usage of `useSWR`, `mutate` and `trigger` of `SWR` library with a Hasura GraphQL API. The app uses native websockets for implementing GraphQL subscriptions on the client.\n\n- Hasura GraphQL APIs for instant GraphQL backend.\n- Integrate simple GraphQL queries.\n- Optimistic UI with GraphQL mutations.\n- GraphQL Subscriptions using native websockets.\n\n## Deploy Hasura to get a GraphQL API\n\n1. Click on the following button to deploy GraphQL engine on Hasura Cloud including Postgres add-on or using an existing Postgres database:\n\n    [![Deploy to Hasura Cloud](https://graphql-engine-cdn.hasura.io/img/deploy_to_hasura.png)](https://cloud.hasura.io/)\n\n2. Open the Hasura console\n\n   Click on the button \"Launch console\" to open the Hasura console.\n\n3. Create table users\n\n    Head to the `Data` tab and create a new table called `users` with columns: \n    id (text), name (text), created_at (timestamp now()).\n\n4. Try out a GraphQL Query\n\n    ```graphql\n    query {\n        users {\n            id\n            name\n            created_at\n        }\n    }\n    ```\n\n## One-Click Deploy\n\nDeploy your own SWR project with ZEIT Now.\n\n[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/praveenweb/swr-graphql/tree/master)\n\n## How to Use\n\nInstall it and run:\n\n```bash\nyarn\nyarn dev\n# or\nnpm install\nnpm run dev\n```\n\nDeploy it to the cloud with [now](https://zeit.co/home) ([download](https://zeit.co/download))\n\n```\nnow\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpraveenweb%2Fswr-graphql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpraveenweb%2Fswr-graphql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpraveenweb%2Fswr-graphql/lists"}