fauna / fauna-js

Javascript driver for Fauna v10 (current)
https://fauna.com
Other
37 stars 7 forks source link

Better support for interfaces as query responses #305

Closed ptpaterson closed 2 weeks ago

ptpaterson commented 2 weeks ago

Provide better support and documentation for how to use interfaces as query responses.

resolves #304

Description

Motivation and context

Sometimes, specifying interfaces for query responses is preferred over types. However, custom interfaces are currently not assignable to QueryValue and cannot be used where QueryValue is required (e.g. the Client.query() method).

See #304

How was the change tested?

I added tests to demonstrate how interfaces may be used.

Screenshots (if appropriate):

image

Change types

Checklist:


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.