How to use the ra-data-graphql-simple function in ra-data-graphql-simple

To help you get started, weā€™ve selected a few ra-data-graphql-simple 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 bootstrap-styled / ra-ui / examples / demo / src / dataProvider / graphql.js View on Github external
case 'commands':
                return 'Command';

            case 'products':
                return 'Product';

            case 'reviews':
                return 'Review';

            default:
                throw new Error(`Unknown resource ${resource}`);
        }
    };

    return buildApolloClient({
        clientOptions: {
            uri: 'http://localhost:4000/graphql',
        },
    }).then(dataProvider => (type, resource, params) =>
        dataProvider(type, getGqlResource(resource), params)
    );
};
github marmelab / react-admin / examples / demo / src / dataProvider / graphql.js View on Github external
export default () => {

    return buildApolloClient({
        clientOptions: {
            uri: 'http://localhost:4000/graphql',
        },
        introspection: {
            operationNames: {
                [DELETE]: resource => `remove${resource.name}`
            }
        },
        buildQuery: customBuildQuery
    }).then(dataProvider => (type, resource, params) =>
        dataProvider(type, getGqlResource(resource), params)
    );
};

ra-data-graphql-simple

A GraphQL simple data provider for react-admin

MIT
Latest version published 19 days ago

Package Health Score

93 / 100
Full package analysis