FQL v4 will be decommissioned on June 30, 2025. Ensure that you complete your migration from FQL v4 to FQL v10 by that date. Fauna accounts created after August 21, 2024 must use FQL v10. These accounts will not be able to run FQL v4 queries or access the v4 Dashboard. For more details, see the v4 EOL announcement and migration guide. Contact support@fauna.com with any questions. |
Token metadata
Solution
Set the data
field in a token:
{
ref: Ref(Tokens(), "1"),
ts: 1631739422930000,
instance: Ref(Collection("users"), "1"),
data: { team: 'Marketing' }
}
{'ref': Ref(id=1, collection=Ref(id=tokens)), 'ts': 1631739701090000, 'instance': Ref(id=1, collection=Ref(id=users, collection=Ref(id=collections))), 'data': {'team': 'Marketing'}}
map[data:map[team:Marketing] instance:{1 0xc000200660 0xc000200660 <nil>} ref:{1 0xc0002004b0 0xc0002004b0 <nil>} ts:1631739856660000]
ObjectV(ref: RefV(id = "1", collection = RefV(id = "tokens")),ts: LongV(1631740130800000),instance: RefV(id = "1", collection = RefV(id = "users", collection = RefV(id = "collections"))),data: ObjectV(team: StringV(Marketing)))
{ref: ref(id = "1", collection = ref(id = "tokens")), ts: 1631740302150000, instance: ref(id = "1", collection = ref(id = "users", collection = ref(id = "collections"))), data: {team: "Marketing"}}
{
ref: Ref(Tokens(), "1"),
ts: 1631738655590000,
instance: Ref(Collection("users"), "1"),
data: { team: 'Marketing' }
}
Is this article helpful?
Tell Fauna how the article can be improved:
Visit Fauna's forums
or email docs@fauna.com
Thank you for your feedback!