Loving Tina? ⭐️ us on GitHubStar

We use cookies to improve your experience. By continuing, you agree to our use of cookies. Learn More

Docs

v.Latest
Introduction
Core Concepts
Querying Content
Editing
Customizing Tina
Going To Production
Media
Drafts
Guides
Further Reference

Adding a document with addPendingDocument

The addPendingDocument mutation will take in the collection name as a parameter, as well as the new relative path.

Note: addPendingDocument does not currently support fields of any kind, just creating the record.
mutation {
addPendingDocument(collection: "post", relativePath: "pedro.json") {
__typename
}
}
{
"data": {
"addPendingDocument": {
"__typename": "Post"
}
}
}
Ready to try out some of these queries using your specific schema? Try running the Tina CLI and testing them out using the Altair client
Last Edited: August 15, 2024