How to use the graphql-predictions-transformer.PredictionsTransformer function in graphql-predictions-transformer

To help you get started, we’ve selected a few graphql-predictions-transformer 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 aws-amplify / amplify-cli / packages / amplify-provider-awscloudformation / lib / transform-graphql-schema.js View on Github external
return async (addSearchableTransformer, storageConfig) => {
    const transformerList = [
      // TODO: Removing until further discussion. `getTransformerOptions(project, '@model')`
      new DynamoDBModelTransformer(),
      new VersionedModelTransformer(),
      new FunctionTransformer(),
      new HttpTransformer(),
      new KeyTransformer(),
      new ModelConnectionTransformer(),
      new PredictionsTransformer(storageConfig),
    ];

    if (addSearchableTransformer) {
      transformerList.push(new SearchableModelTransformer());
    }

    const customTransformersConfig = await readTransformerConfiguration(resourceDir);
    const customTransformers = (customTransformersConfig && customTransformersConfig.transformers
      ? customTransformersConfig.transformers
      : []
    )
      .map(transformer => {
        const fileUrlMatch = /^file:\/\/(.*)\s*$/m.exec(transformer);
        const modulePath = fileUrlMatch ? fileUrlMatch[1] : transformer;

        if (!modulePath) {

graphql-predictions-transformer

Implements the @predictions directive.

Apache-2.0
Latest version published 5 months ago

Package Health Score

89 / 100
Full package analysis

Popular graphql-predictions-transformer functions