Documentation
Dummy Data
On the left-side menu, you will find instructions on how to perform requests on the dummy data. This is a REST service where, for every category, you will find the endpoint, payload, and response. Feel free to explore the categories and check how they work. For example: /api/users
GraphQL
This is a different way to consume data compared to REST. I suggest first checking your queries in /playground. The GraphQL queries works on the endpoint /query . Here is a summary of the Schemas, Queries and Mutations you can perform.
| Query | Mutation |
|---|---|
songs: [Song!]!song(id: ID!): Song | createSong(input: CreateSongInput): Song!updateSong(id: ID!, input: UpdateSongInput): Song!deleteSong(id: ID!): Song! |
users: [User!]!user(id: ID!): User | createUser(input: CreateUserInput!): User!updateUser(id: ID!, input: UpdateUserInput): User!deleteUser(id: ID!): User! |
posts: [Post!]!post(id: ID!): Post | createPost(input: CreatePostInput): Post!updatePost(id: ID!, input: UpdatePostInput): Post!deletePost(id: ID!): Post! |
comments: [Comment!]!comment(id: ID!): Comment | createComment(input: CreateCommentInput): Comment!updateComment(id: ID!, input: UpdateCommentInput): Comment!deleteComment(id: ID!): Comment! |
products: [Product!]!product(id: ID!): Product | createProduct(input: CreateProductInput): Product!updateProduct(id: ID!, input: UpdateProductInput): Product!deleteProduct(id: ID!): Product! |
todos: [Todo!]!todo(id: ID!): Todo | createTodo(input: CreateTodoInput): Todo!updateTodo(id: ID!, input: UpdateTodoInput): Todo!deleteTodo(id: ID!): Todo! |
movies: [Movie!]!movie(id: ID!): Movie | createMovie(input: CreateMovieInput): Movie!updateMovie(id: ID!, input: UpdateMovieInput): Movie!deleteMovie(id: ID!): Movie! |
You can also see this information in the /playground docs menu
GeoJSON
It is important highlight that when you use GeoJSON format the coordinates are in the following order [longitude, latitude]. You are free to check the endpoints and data, using a tool like https://geojson.io could be useful to see the result in a map quickly.
Here is a small map with some data obtained by /api/cities?limit=3
A map is loading
Here is another map with some geometry data obtained by /api/countries/COL /api/countries/EGY /api/countries/IND
A map is loading
Custom Mock
On /docs/mock you can create custom endpoints in case you need a dummy endpoint to test specific data. The endpoint expires after 1hr so you must to create a new one. In the mean tiem you can edit the last one created. You have the following options available to create your endpoint:
| Method | Status Code | Response Body |
|---|---|---|
GETPOSTPUTPATCHDELETE | 200400401403404500503 | {...your JSON Object} |
AI
I am working on it... If you have ideas on this topic contact me :)