{"id":22400942,"url":"https://github.com/samdenty/fakerql","last_synced_at":"2025-07-26T01:05:11.872Z","repository":{"id":95200373,"uuid":"191729446","full_name":"samdenty/fakerql","owner":"samdenty","description":null,"archived":false,"fork":false,"pushed_at":"2019-11-01T19:00:53.000Z","size":216,"stargazers_count":2,"open_issues_count":2,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-26T21:15:12.756Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/samdenty.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2019-06-13T09:09:56.000Z","updated_at":"2020-06-06T01:09:44.000Z","dependencies_parsed_at":"2023-06-12T11:45:17.103Z","dependency_job_id":null,"html_url":"https://github.com/samdenty/fakerql","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/samdenty%2Ffakerql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samdenty%2Ffakerql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samdenty%2Ffakerql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samdenty%2Ffakerql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samdenty","download_url":"https://codeload.github.com/samdenty/fakerql/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228258291,"owners_count":17892657,"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":[],"created_at":"2024-12-05T08:17:26.876Z","updated_at":"2024-12-05T08:17:27.941Z","avatar_url":"https://github.com/samdenty.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FakerQL\n\nFakerQL was created for frontend developers and GraphQL powered apps. Whether you're getting started with a new project or learning Relay/Apollo, you can forget about building a custom server and rely on [Faker.js](https://github.com/marak/Faker.js) to provide some goodies!\n\n## Give it a try\n\nYou can head over to [GraphiQL](https://fakerql.com) to send some example queries and mutations.\n\n## Queries\n\n#### Get authorised user\n\nYou can request the logged in user provided you pass a valid `Authorization` header with a signed `JWT`. This can be done using the `register`/`login` mutations.\n\n```graphql\n# me\n\n{\n  me {\n    id\n    firstName\n    lastName\n    email\n    avatar\n  }\n}\n```\n\n#### Get a list of users\n\nYou can request a list of users. `count` is optional and defaults to 25.\n\n```graphql\n# allUsers(count: Int)\n\n{\n  allUsers(count: 5) {\n    id\n    firstName\n    lastName\n    email\n    avatar\n  }\n}\n```\n\n#### Get a User\n\nYou can request a single User by providing any ID.\n\n```graphql\n# User(id: String!)\n\n{\n  allUsers(id: \"wk0z1j1tzj7xc0116is3ckdrx\") {\n    id\n    firstName\n    lastName\n    email\n    avatar\n  }\n}\n```\n\n#### Get a list of products\n\nYou can request a list of products. `count` is optional and defaults to 25.\n\n```graphql\n# allProducts(count: Int)\n\n{\n  allProducts(count: 5) {\n    id\n    name\n    price\n  }\n}\n```\n\n#### Get a Product\n\nYou can request a single Product by providing any ID.\n\n```graphql\n# Product(id: String!)\n\n{\n  allProduct(id: \"cjbrygtdz3e480147hv8ozt40\") {\n    id\n    name\n    price\n  }\n}\n```\n\n#### Get a list of todos\n\nYou can request a list of todos. `count` is optional and defaults to 25.\n\n```graphql\n# allTodos(count: Int)\n\n{\n  allTodos(count: 5) {\n    id\n    title\n    completed\n  }\n}\n```\n\n#### Get a Todo\n\nYou can request a single Todo by providing any ID.\n\n```graphql\n# Todo(id: String!)\n\n{\n  Todo(id: \"cjbrygq0u3e4301476mfqoaae\") {\n    id\n    title\n    completed\n  }\n}\n```\n\n#### Get a list of posts\n\nYou can request a list of posts. `count` is optional and defaults to 25.\n\n```graphql\n# allPosts(count: Int)\n\n{\n  allPosts(count: 5) {\n    id\n    title\n    body\n    published\n    createdAt\n    author {\n      id\n      firstName\n      lastName\n      avatar\n    }\n  }\n}\n```\n\n#### Get a Post\n\nYou can request a single Post by providing any ID.\n\n```graphql\n# Post(id: String!)\n\n{\n  Post(id: \"cjbryfb1x3e3c0147f4f4110o\") {\n    id\n    title\n    body\n    published\n    createdAt\n    author {\n      id\n      firstName\n      lastName\n      avatar\n    }\n  }\n}\n```\n\n## Mutations\n\n#### Register user\n\nRegistering a User returns a random signed JWT. `expiresIn` is optional and pretty much pointless right now.\n\n```graphql\n# register(email: String!, password: String!, expiresIn: String)\n\nmutation {\n  register(email: \"hi@jamiebarton.co.uk\", password: \"F4K3rqL!\", expiresIn: '24h') {\n    token\n  }\n}\n```\n\n#### Login user\n\nLogging in a User returns a random signed JWT. `expiresIn` is optional and pretty much pointless right now.\n\n```graphql\n# login(email: String!, password: String!, expiresIn: String)\n\nmutation {\n  login(email: \"hi@jamiebarton.co.uk\", password: \"F4K3rqL!\") {\n    token\n  }\n}\n```\n\n#### Updating user\n\nThis mutation returns the updated data you passed in to update.\n\n```graphql\n# updateUser(id: ID!, email: String!, firstName: String, lastName: String)\n\nmutation {\n  updateUser(id: \"wk0z1j1tzj7xc0116is3ckdrx\", firstName: \"Jim\") {\n    id\n    firstName\n    lastName\n  }\n}\n```\n\n➡️ You must specify the header `Authorization: Bearer token` to satisfy this mutation.\n\n#### Create Todo\n\nThis mutation returns the data you sent arguments + a fake ID.\n\n```graphql\n# createTodo(title: String!, completed: Boolean)\n\nmutation {\n  createTodo(title: \"Book movie tickets\") {\n    id\n    title\n    completed\n  }\n}\n```\n\n## Subscriptions\n\n_Coming soon._\n\n## Client side library example\n\nThe example below uses [graphql-request](https://github.com/graphcool/graphql-request).\n\n```js\nimport { request } from 'graphql-request';\n\nconst query = `{\n  products: allProducts(count: 25) {\n    id\n    name\n    price\n  }\n\n  user: User(id: \"wk0z1j1tzj7xc0116is3ckdrx\") {\n    id\n    firstName\n    lastName\n    email\n    avatar\n  }\n}`;\n\nrequest('https://fakerql.com/graphql', query).then(data =\u003e console.log(data));\n```\n\n## Todo\n\n* Subscriptions\n* Custom directives\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamdenty%2Ffakerql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamdenty%2Ffakerql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamdenty%2Ffakerql/lists"}