Provide targeting attributes
Hypertune is uniquely architected to let you define targeting attributes at the:
root
levelindividual flag level
And provide them during:
SDK initialization
local flag evaluation
a mix of both
Provide targeting attributes during SDK initialization
To provide targeting attributes during SDK initialization, use an initialization query.
Provide targeting attributes during local flag evaluation
On the server, you'll typically provide targeting attributes when locally evaluating the root
flag, passing it the context
argument you defined in your schema. You'll get back the Root
SDK node which will have type-safe methods to evaluate all your individual flags. In the browser, this is managed by the generated <HypertuneProvider>
component.
src/lib/getHypertune.ts
Provide flag-specific targeting attributes
You can also provide flag-specific targeting attributes when evaluating individual flags:
Last updated