fauna-gql-upload
Version:
Manage your FaunaDB resources in within your project and upload them using a single command
22 lines (21 loc) • 438 B
text/typescript
import { ProviderResource, ProviderResult } from "../types";
import getClient, { q } from "./client";
export default async function getProviders(providers: ProviderResource[]): Promise<ProviderResult[]>{
const client = await getClient();
return client.query(
q.Map(
providers,
q.Lambda(
"provider",
q.Get(
q.AccessProvider(
q.Select(
"name",
q.Var("provider")
)
)
)
)
)
)
}