{"id":25171774,"url":"https://github.com/basemax/bloglaravelgraphql","last_synced_at":"2026-04-13T23:32:14.249Z","repository":{"id":187085428,"uuid":"674971740","full_name":"BaseMax/BlogLaravelGraphQL","owner":"BaseMax","description":"The GraphQL-Based Blog System is a powerful and modern blog application that allows users to read, create, update, and delete blog posts, manage comments, and perform various other operations through a GraphQL API. It offers a more intuitive and customizable way of querying data compared to RESTful APIs.","archived":false,"fork":false,"pushed_at":"2026-01-31T02:31:30.000Z","size":1282,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-31T17:51:55.474Z","etag":null,"topics":["graphql","graphql-php","graphql-php-library","laravel","laravel-10","laravel-graphql","laravel-php","laravel10","php","php-graphql","php-laravel","php8"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BaseMax.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-08-05T10:48:17.000Z","updated_at":"2026-01-31T02:30:04.000Z","dependencies_parsed_at":"2025-12-10T23:02:10.721Z","dependency_job_id":null,"html_url":"https://github.com/BaseMax/BlogLaravelGraphQL","commit_stats":null,"previous_names":["basemax/bloglaravelgraphql"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/BaseMax/BlogLaravelGraphQL","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FBlogLaravelGraphQL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FBlogLaravelGraphQL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FBlogLaravelGraphQL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FBlogLaravelGraphQL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BaseMax","download_url":"https://codeload.github.com/BaseMax/BlogLaravelGraphQL/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FBlogLaravelGraphQL/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31775758,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T20:17:16.280Z","status":"ssl_error","status_checked_at":"2026-04-13T20:17:08.216Z","response_time":93,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","graphql-php","graphql-php-library","laravel","laravel-10","laravel-graphql","laravel-php","laravel10","php","php-graphql","php-laravel","php8"],"created_at":"2025-02-09T09:22:00.732Z","updated_at":"2026-04-13T23:32:14.221Z","avatar_url":"https://github.com/BaseMax.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GraphQL-Based Blog System - Laravel\n\nWelcome to the GraphQL-Based Blog System, a full-featured and feature-rich blog application developed in Laravel 10 and PHP 8.2. This application leverages GraphQL instead of a traditional RESTful API to provide a more flexible and efficient way of fetching data.\n\nThe GraphQL-Based Blog System is a powerful and modern blog application that allows users to read, create, update, and delete blog posts, manage comments, and perform various other operations through a GraphQL API. It offers a more intuitive and customizable way of querying data compared to RESTful APIs.\n\n## Features\n\n- **User Authentication**: Allow users to sign up, log in, and manage their profiles.\n- **Blog Posts**: Create, read, update, and delete blog posts with different attributes like title, content, tags, and date.\n- **Comments**: Users can leave comments on blog posts.\n- **Categories and Tags**: Organize blog posts into categories and add tags for easy navigation.\n- **Search**: Implement a powerful search functionality to find blog posts by keywords.\n- **Pagination**: Handle large sets of data with pagination support.\n- **Error Handling**: Gracefully handle errors and provide helpful messages in responses.\n- **Security**: Implement authentication and authorization to protect sensitive operations.\n- **GraphQL Subscriptions (Real-Time Updates)**: Optionally, you can add real-time updates for comments or new blog posts using GraphQL subscriptions.\n\n## Requirements\n\nTo run this blog system, you need the following software and tools installed on your server:\n\n- PHP 8.2\n- Laravel 10 or higher\n- Composer\n- MySQL or any compatible database system\n\n## Installation\n\n- Clone the repository or download the source code.\n- Run `composer install` to install the required dependencies.\n- Create a new MySQL database for the blog system.\n- Copy the `.env.example` file to `.env` and configure your database connection settings.\n- Run `php artisan migrate` to create the necessary database tables.\n\n## Configuration\n\n- Customization: The application is highly customizable. You can modify views, styles, and **GraphQL** schema to suit your needs.\n- Environment Variables: The `.env` file contains various environment variables to control the behavior of the application. Make sure to configure them correctly.\n\n## Usage\n\nTo run the blog system, use the following command:\n\n```\nphp artisan serve\n```\n\nNow open `http://localhost:8000/graphiql`. this is a environment for running graphql queries and get response. in below window you can add Authorization token(you can get that after login or register) and dont forget to add `Content-Type: application/json` header.\n\n## GraphQL\n\n**Queries:**\n\n- Get all blog posts: Retrieve a list of all blog posts with their titles and dates.\n\n```graphql\nquery {\n  posts {\n    title\n    content\n    author {\n      username\n    }\n    created_at\n    updated_at\n  }\n}\n```\n\n```json\n{\n  \"data\": {\n    \"posts\": [\n      {\n        \"title\": \"pizza\",\n        \"content\": \"here we want to learn how make a pizza.\",\n        \"author\": {\n          \"username\": \"AliAhmadi\"\n        },\n        \"created_at\": null,\n        \"updated_at\": null\n      }\n    ]\n  }\n}\n```\n\n- Get a single blog post: Retrieve detailed information about a specific blog post by its ID.\n\n```graphql\nquery {\n  post(id: 2) {\n    id\n    title\n    content\n    created_at\n    updated_at\n    author {\n      name\n      username\n      email\n    }\n  }\n}\n```\n\n```json\n{\n  \"data\": {\n    \"post\": {\n      \"id\": \"2\",\n      \"title\": \"pizza\",\n      \"content\": \"here we want to learn how make a pizza.\",\n      \"created_at\": null,\n      \"updated_at\": null,\n      \"author\": {\n        \"name\": \"Ali\",\n        \"username\": \"AliAhmadi\",\n        \"email\": \"aliahmadi82c@gmail.com\"\n      }\n    }\n  }\n}\n```\n\n- Search blog posts: Search for blog posts based on keywords and retrieve a list of matching posts.\n\n```graphql\nquery {\n  search(key: \"pizza\") {\n    id\n    title\n    content\n    created_at\n    updated_at\n    category {\n      description\n    }\n  }\n}\n```\n```json\n{\n  \"data\": {\n    \"search\": [\n      {\n        \"id\": \"2\",\n        \"title\": \"pizza\",\n        \"content\": \"here we want to learn how make a pizza.\",\n        \"created_at\": null,\n        \"updated_at\": null,\n        \"category\": {\n          \"description\": \"posts related to food world\"\n        }\n      }\n    ]\n  }\n}\n```\n\n- Get all categories: Retrieve a list of all blog categories.\n\n```graphql\nquery {\n  categories {\n    id\n    name\n    description\n    created_at\n    updated_at\n    __typename\n  }\n}\n```\n\n```json\n{\n  \"data\": {\n    \"categories\": [\n      {\n        \"id\": \"1\",\n        \"name\": \"food\",\n        \"description\": \"posts related to food world\",\n        \"created_at\": null,\n        \"updated_at\": null,\n        \"__typename\": \"Category\"\n      }\n    ]\n  }\n}\n```\n\n- Get all tags: Retrieve a list of all blog tags.\n\n```graphql\nquery {\n  tags {\n    id\n    name\n    description\n    created_at\n    updated_at\n    __typename\n  }\n}\n```\n\n```json\n{\n  \"data\": {\n    \"tags\": []\n  }\n}\n```\n\n- Get popular posts: Retrieve a list of the most popular blog posts based on views or comments.\n\n```graphql\nquery {\n  popularPosts {\n    id\n    title\n    content\n    author {\n      username\n      email\n    }\n    likes\n    views\n    isPublished\n    created_at\n    updated_at\n  }\n}\n```\n\n```json\n{\n  \"data\": {\n    \"popularPosts\": [\n      {\n        \"id\": \"2\",\n        \"title\": \"pizza\",\n        \"content\": \"here we want to learn how make a pizza.\",\n        \"author\": {\n          \"username\": \"AliAhmadi\",\n          \"email\": \"aliahmadi82c@gmail.com\"\n        },\n        \"likes\": 34,\n        \"views\": 2974,\n        \"isPublished\": true,\n        \"created_at\": null,\n        \"updated_at\": null\n      }\n    ]\n  }\n}\n```\n\n- Get user profile: Retrieve information about the currently logged-in user.\n```graphql\nquery {\n  me {\n    id\n    email\n    password\n    username\n    posts {\n      title\n    }\n  }\n}\n```\nHeaders:\n\n```json\n{\n  \"Authorization\": \"Bearer 7|SFHqazMxgtULjxDJx40qtdQomwYpIOYiKARXvdZP\",\n  \"Accept\": \"application/json\"\n}\n```\n- Get user's own posts: Retrieve a list of blog posts created by the currently logged-in user.\n```graphql\nquery {\n  me {\n    posts {\n      title\n      content\n      category {\n        name\n      }\n    }\n  }\n}\n```\n```json\n{\n  \"data\": {\n    \"me\": {\n      \"posts\": [\n        {\n          \"title\": \"moon and mars\",\n          \"content\": \"i want to be first person walked throught mars\",\n          \"category\": {\n            \"name\": \"food\"\n          }\n        }\n      ]\n    }\n  }\n}\n```\n- Get user's favorite posts: Retrieve a list of blog posts marked as favorites by the currently logged-in user.\n```graphql\nquery {\n  myFavorites {\n    post {\n      title\n    }\n  }\n}\n```\n```json\n{\n  \"data\": {\n    \"myFavorites\": []\n  }\n}\n```\n- Get posts by category: Retrieve all blog posts belonging to a specific category.\n```graphql\nquery {\n  category(id: 1) {\n    posts {\n      title\n      content\n      likes\n      views\n      isPublished\n    }\n  }\n}\n```\n```json\n{\n  \"data\": {\n    \"category\": {\n      \"posts\": [\n        {\n          \"title\": \"pizza\",\n          \"content\": \"here we want to learn how make a pizza.\",\n          \"likes\": 34,\n          \"views\": 2974,\n          \"isPublished\": true\n        },\n        {\n          \"title\": \"moon and mars\",\n          \"content\": \"i want to be first person walked throught mars\",\n          \"likes\": 0,\n          \"views\": 0,\n          \"isPublished\": true\n        }\n      ]\n    }\n  }\n}\n```\n- Get posts by tag: Retrieve all blog posts associated with a specific tag.\n```graphql\nquery {\n  tag(id: 1) {\n    name\n    description\n    posts {\n      id\n      title\n      content\n      category {\n        name\n      }\n      likes\n      views\n    }\n  }\n}\n```\n```json\n{\n  \"data\": {\n    \"tag\": null\n  }\n}\n```\n- Get total number of posts: Retrieve the total number of blog posts in the system.Get posts by author: Retrieve all blog posts written by a specific author.\n```graphql\nquery {\n  countOfPosts\n}\n```\n```json\n{\n  \"data\": {\n    \"countOfPosts\": 2\n  }\n}\n```\n- Get user by ID: Retrieve detailed information about a user by their ID.\n```graphql\nquery {\n  user(id: 2) {\n    name\n    username\n    email\n    email_verified_at\n  }\n}\n```\n```json\n{\n  \"data\": {\n    \"user\": {\n      \"name\": \"Ali\",\n      \"username\": \"AliAhmadi\",\n      \"email\": \"aliahmadi82c@gmail.com\",\n      \"email_verified_at\": null\n    }\n  }\n}\n```\n- Get user activity: Retrieve a user's recent activity, including posts created, comments made, and liked posts.\n- Get most active users: Retrieve a list of the most active users based on the number of posts and comments they've made.\n- Get user notifications: Retrieve a list of notifications for the currently logged-in user.\n```graphql\nquery {\n  user(id: 2) {\n    name\n    username\n    email\n    email_verified_at\n    notifications {\n      id\n      message\n      created_at\n    }\n  }\n}\n```\n```json\n{\n  \"data\": {\n    \"user\": {\n      \"name\": \"Ali\",\n      \"username\": \"AliAhmadi\",\n      \"email\": \"aliahmadi82c@gmail.com\",\n      \"email_verified_at\": null,\n      \"notifications\": []\n    }\n  }\n}\n```\n- Get posts by date range: Retrieve blog posts published within a specified date range.\n- Get posts by popularity: Retrieve blog posts sorted by popularity (e.g., based on likes, views, or comments).\n- Get posts by user's location: Retrieve blog posts based on the user's geolocation or specified location filter.\n- Get posts with specific metadata: Retrieve blog posts based on custom metadata or attributes associated with them.\n- Get user activity by date: Retrieve a user's activity within a specified date range, including posts and comments.\n- Get posts with attachments: Retrieve blog posts that have attachments such as images, videos, or files.\n- Get posts by popularity in a time range: Retrieve blog posts sorted by popularity within a specific time period (e.g., the last month).\n- Get posts by tag popularity: Retrieve tags ordered by their popularity based on the number of times they have been used.\n- Get posts with similar titles: Retrieve blog posts with titles similar to a given query.\n- Get posts based on language: Retrieve blog posts written in a specific language or language code.\n\n**Mutations:**\n\n- Create a new blog post: Create a new blog post with title, content, category, and tags.\n- Update a blog post: Update an existing blog post by its ID with new title, content, category, or tags.\n- Delete a blog post: Delete a specific blog post by its ID.\n- Create a new comment: Add a new comment to a blog post with the author's name and comment content.\n- Update a comment: Update an existing comment by its ID with new content.\n- Delete a comment: Delete a specific comment by its ID.\n- Like a post: Allow a user to like a blog post, incrementing its likes count.\n- Dislike a post: Allow a user to remove their like from a blog post, decrementing its likes count.\n- Add post to favorites: Allow a user to add a blog post to their list of favorite posts.\n- Remove post from favorites: Allow a user to remove a blog post from their list of favorite posts.\n- Register new user: Create a new user account with username, email, and password.\n- Login: Authenticate a user and issue an access token upon successful login.\n- Logout: Invalidate the user's access token upon logout.\n- Update user profile: Update the currently logged-in user's profile information.\n- Change password: Allow the user to change their account password.\n- Create a new category: Allow an admin user to create a new blog post category.\n- Update a category: Allow an admin user to update the name or description of a category.\n- Delete a category: Allow an admin user to delete a category, along with its associated blog posts.\n- Create a new tag: Allow an admin user to create a new blog post tag.\n- Update a tag: Allow an admin user to update the name or description of a tag.\n- Delete a tag: Allow an admin user to delete a tag, removing it from all associated blog posts.\n- Flag inappropriate content: Allow users to flag a blog post or comment as inappropriate for review by administrators.\n- Approve flagged content: Allow administrators to review flagged content and mark it as approved or disapproved.\n- Create a new user role: Allow an admin user to create a new role with specific permissions.\n- Update user role: Allow an admin user to update the permissions of an existing role.\n- Add post view: Increment the view count of a blog post when a user visits it.\n- Create a new user account with social login: Allow users to register using their social media accounts (e.g., Google or Facebook).\n- Reset user password: Allow users to request a password reset email if they forget their password.\n- Confirm email address: Enable users to confirm their email address after registration.\n- Delete user account: Allow users to delete their own accounts and associated data.\n- Share post: Allow users to share blog posts via email or social media.\n- Pin post: Allow an admin user to pin a blog post to the top of the homepage or a specific category.\n- Unpin post: Allow an admin user to remove a pinned status from a blog post.\n- Moderate comments: Allow moderators to review and approve or reject comments before they appear on the site.\n\n## GraphQL Schema\n\nThe GraphQL schema defines the types, queries, mutations, and subscriptions available in the API. The schema can be found in the graphql directory.\n\n```graphql\ntype User {\n  id: ID!\n  username: String!\n  email: String!\n  posts: [Post!]!\n  favoritePosts: [Post!]!\n  createdAt: String!\n  updatedAt: String!\n}\n\ntype Category {\n  id: ID!\n  name: String!\n  description: String\n  posts: [Post!]!\n}\n\ntype Tag {\n  id: ID!\n  name: String!\n  description: String\n  posts: [Post!]!\n}\n\ntype Comment {\n  id: ID!\n  content: String!\n  author: User!\n  post: Post!\n  createdAt: String!\n  updatedAt: String!\n}\n\ntype Post {\n  id: ID!\n  title: String!\n  content: String!\n  author: User!\n  category: Category!\n  tags: [Tag!]!\n  comments: [Comment!]!\n  likes: Int!\n  views: Int!\n  isPublished: Boolean!\n  createdAt: String!\n  updatedAt: String!\n}\n\ntype Notification {\n  id: ID!\n  message: String!\n  user: User!\n  createdAt: String!\n}\n\ntype AuthPayload {\n  token: String!\n  user: User!\n}\n\ntype Query {\n  allPosts: [Post!]!\n  post(id: ID!): Post\n  searchPosts(query: String!): [Post!]!\n  allCategories: [Category!]!\n  allTags: [Tag!]!\n  recentPosts(limit: Int!): [Post!]!\n  popularPosts(limit: Int!): [Post!]!\n  commentsByPost(postId: ID!): [Comment!]!\n  user(id: ID!): User\n  currentUser: User\n  trendingTags(limit: Int!): [Tag!]!\n}\n\ntype Mutation {\n  createPost(title: String!, content: String!, categoryId: ID!, tagIds: [ID!]!): Post!\n  updatePost(id: ID!, title: String!, content: String!, categoryId: ID!, tagIds: [ID!]!): Post!\n  deletePost(id: ID!): ID\n  createComment(postId: ID!, content: String!): Comment!\n  updateComment(id: ID!, content: String!): Comment!\n  deleteComment(id: ID!): ID\n  likePost(postId: ID!): Post!\n  dislikePost(postId: ID!): Post!\n  addToFavorites(postId: ID!): User!\n  removeFromFavorites(postId: ID!): User!\n  register(username: String!, email: String!, password: String!): AuthPayload!\n  login(email: String!, password: String!): AuthPayload!\n  logout: Boolean!\n  updateProfile(username: String!, email: String!): User!\n  changePassword(currentPassword: String!, newPassword: String!): Boolean!\n}\n\nschema {\n  query: Query\n  mutation: Mutation\n}\n```\n\n## Contributing\n\nWe welcome contributions from the community. If you want to contribute to the project, please fork the repository, make your changes, and submit a pull request.\n\n## License\n\nThe GraphQL-Based Blog System is open-source software released under the GPL-3.0 License. See the LICENSE file for more information.\n\n## Authors\n\n- Ali\n- Max\n\nCopyright 2023, Max Base\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasemax%2Fbloglaravelgraphql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbasemax%2Fbloglaravelgraphql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasemax%2Fbloglaravelgraphql/lists"}