⚡Quickstart
This page helps you get up and running with the Maildrop API within ten minutes.
The Maildrop API is based on GraphQL, which allows for an easy HTTP API integration with your codebase. The maildrop.cc website uses the Apollo GraphQL client to access the API, and this document will help show how to create raw HTTP requests or use the prebuilt Apollo Javascript library.
See Also
Quickstart - curl
curl --request POST \
--header 'content-type: application/json' \
--url https://api.maildrop.cc/graphql \
--data '{"query":"query Example {\n ping(message:\"hello, world!\")\n}"}'should return
{"data":{"ping":"pong hello, world!"}}Quickstart - React
Install the Apollo React library into your project
Set up the schema for your Apollo client
Set up your GraphQL client object
Set up a test GraphQL query
Set up a component to run the query and display the results
You should see a page which returns the text "Return: pong Hello, world!". The Apollo library is extremely powerful, and takes care of the raw HTTP requests, authentication, caching, JSON parsing, and so on. It acts as a React hook, so as the request starts, the loading boolean automatically changes, triggering a re-render, and then when the data comes in for the request, another re-render is automatically done.
Last updated