feathersjs / feathers

The API and real-time application framework
https://feathersjs.com
MIT License
15.07k stars 752 forks source link

feat(schema): Allow to add additional operators to the query syntax #2941

Closed daffl closed 1 year ago

daffl commented 1 year ago

This pull request allows to extend the querySyntax schemas with custom operators like $ilike. In TypeBox this looks like this:

const messageQuerySchema = Type.Intersect(
  [
    // This will additioanlly allow querying for `{ name: { $ilike: 'Dav%' } }`
    querySyntax(messageQueryProperties, {
      name: {
        $ilike: Type.String()
      }
    }),
    // Add additional query properties here
    Type.Object({})
  ],
  { additionalProperties: false }
)

Closes https://github.com/feathersjs/feathers/issues/2759 Closes https://github.com/feathersjs/feathers/issues/2933

netlify[bot] commented 1 year ago

Deploy Preview for feathers-dove ready!

Name Link
Latest commit 0202e911c2b665710ea80a521e443f1242f91450
Latest deploy log https://app.netlify.com/sites/feathers-dove/deploys/63a0f31a04714f000869b993
Deploy Preview https://deploy-preview-2941--feathers-dove.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

marshallswain commented 1 year ago

:shipit: