fauna-gql-upload
Version:
Manage your FaunaDB resources in within your project and upload them using a single command
11 lines (10 loc) • 552 B
TypeScript
import { Resource, StandardResourceType } from "../types";
/**
* Create or update a resource. Returns the action that was taken.
* @param {Object} resource - A function object.
* @param {String} obj.name - The name of the function
* @param {Object} obj.body - The actual function body
* @param {String} [obj.role] - The role of the function
* @returns {Promise<string>} Promise that resolves to either `created` or `updated`
*/
export default function createOrUpdateResources(resources: Resource[], type: StandardResourceType): Promise<object>;