How to use the resolve-query.default function in resolve-query

To help you get started, we’ve selected a few resolve-query 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 reimagined / resolve / tests / read-models-transactional / worker.js View on Github external
break
      default:
        throw new Error(
          `Incorrect process.env.ADAPTER = ${process.env.ADAPTER}`
        )
    }

    const storage = createStorage({
      pathToFile: path.join(__dirname, 'event-storage.db')
    })

    const eventStore = createEventStore({ storage })
    const connectorName = 'default-adapter'
    const readModelName = 'default-read-model'

    const query = createQuery({
      eventStore,
      viewModels: [],
      readModelConnectors: {
        [connectorName]: adapter
      },
      readModels: [
        {
          name: readModelName,
          connectorName,
          projection,
          resolvers
        }
      ]
    })

    await query.read({

resolve-query

Provides an interface used to create and querry read models and view models in a reSolve application.

MIT
Latest version published 4 years ago

Package Health Score

48 / 100
Full package analysis