Headless Documentation
WelcomeRequirementsIntroductionFolder StructureInstallationData StructureServer and ResolversFrontend ImplementationDevelopmentDeploymentSupportFAQ

Data Structure

In our product we have used three document/table

  1. posts
  2. category
  3. users

Posts

{
id: ID
title: String
slug: String
content: String
status: String
author: Author
authorId: ID
image: Image
price: Float
location: Location
formattedLocation: Location
distance: Float
categories: [Category]
gallery: [Image]
isNegotiable: Boolean
favouritedBy: [String]
condition: Boolean
related(limit: Int): [Post]
contactNumber: String
createdAt: Date
updatedAt: Date
}

Category

{
id: ID!
slug: String
name: String
value: ID
label: String
image: Image
posts(limit: Int, page: Int ): PostWithCount
createdAt: Date
updatedAt: Date
}

Users

{
id: ID
email: String
username: String
mobile: [Mobile]
image: Image
address: String
website: String
name: String
posts(limit: Int, page: Int): PostWithCount
favourite(limit: Int, page: Int): PostWithCount
draft(limit: Int, page: Int) : PostWithCount
createdAt: Date
updatedAt: Date
}