Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge fauna_logs branch into v4 #672

Merged
merged 15 commits into from
Feb 10, 2023
Merged
8 changes: 0 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,21 +128,13 @@ workflows:
context: faunadb-drivers
- core-stable-16:
context: faunadb-drivers
requires:
- core-stable-14
- core-stable-18:
context: faunadb-drivers
requires:
- core-stable-16

# Nightly path
- core-nightly-14:
context: faunadb-drivers
- core-nightly-16:
context: faunadb-drivers
requires:
- core-nightly-14
- core-nightly-18:
context: faunadb-drivers
requires:
- core-nightly-16
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 4.8.0
- Add `tags` and `traceheader` support in `client.query` [#672](https://github.com/fauna/faunadb-js/pull/672)

## 4.7.1
- disallow undefined required args [#663](https://github.com/fauna/faunadb-js/pull/663)

Expand Down
25 changes: 24 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,9 @@ var data = client.query(q.Paginate(q.Collections()), {

#### Per-query options

Some options (currently only `secret` and `queryTimout`) can be overriden on a per-query basis:
Some options can be provided on a per-query basis:

##### secret
```javascript
var createP = client.query(
q.Create(q.Collection('test'), { data: { testField: 'testValue' } }),
Expand All @@ -256,12 +257,34 @@ var helper = client.paginate(
)
```

##### queryTimeout
```javascript
var data = client.query(q.Paginate(q.Collections()), {
queryTimeout: 100,
})
```

##### traceparent
A [W3C-compliant](https://w3c.github.io/trace-context) identifier for enabling distributed tracing across different
vendors. If not provided, one is automatically generated server-side and attached to the query. Customer's should
inspect the returned traceresponse to determine if a new traceparent has been created, and use that instead. See
[Trace Context](https://w3c.github.io/trace-context) spec for more details.
```javascript
var data = client.query(q.Paginate(q.Collections()), {
traceparent: "00-c91308c112be8448dd34dc6191567fa0-b7ad6b7169203331-01",
})
```

##### tags
Allows for associating user-provided tags with a query.
```javascript
var data = client.query(q.Paginate(q.Collections()), {
tags: { key1: "value1", key2: "value2" },
})
```
Both tags and their associated values, must be strings. The only allowable characters are alphanumeric values as well
as an underscope (_). Max length for keys is 40 characters. Max length for values is 60 characters.

#### Custom Fetch

To use a custom `fetch()` you just have to specify it in the configuration and make it compatible with the [standard Web API Specification of the Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API).
Expand Down
Loading