How to use the typed-graphqlify.mutation function in typed-graphqlify

To help you get started, we’ve selected a few typed-graphqlify examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github infrastructure-components / infrastructure-components / src / datalayer / datalayer-libs.ts View on Github external
const mutationObj = {};
    mutationObj[`set_${entryId}`] = params(
        Object.keys(data).reduce((result, key) => {
            result[key] = `"${data[key]}"`;
            return result;
        },{}),
        Object.keys(fields).reduce((result, key) => {
            result[key] = types.string;
            return result;
        },{})
    );

    return {
        mutation: gql`${mutation(mutationObj)}`,
        context: context
    }

};

typed-graphqlify

Build Typed GraphQL Queries in TypeScript. A better TypeScript + GraphQL experience.

MIT
Latest version published 2 years ago

Package Health Score

56 / 100
Full package analysis