Questions tagged [faunadb]

For questions related to FaunaDB, a strongly consistent multi-model database capable of global horizontal scale with a focus on operational simplicity.

FaunaDB is a strongly consistent database capable of global horizontal scale with a focus on operational simplicity. FaunaDB supports document, relational, graph, and temporal data sets from a single query. In addition to its own FQL query language, the product supports GraphQL, with SQL planned for the future.

Fauna Cloud was opened to the public on March 15, 2017.

Links

250 questions
2
votes
1 answer

FaunaDB - How to bulk update list of entries within single graphQL mutation?

I want to bulk update list of entries with graphQL mutation in faunaDB. The input data is list of coronavirus cases from external source. It will be updated frequently. The mutation should update existing entries if the entry name is present in…
user1276919
  • 550
  • 5
  • 25
2
votes
2 answers

Error Message: Instance Data is not valid whilst updating a GraphQL schema

I had an issue with updating a graphql schema and got this message (in my case I was updating a FaunaDB schema). I couldn't find reference to this online.
Matthew Player
  • 318
  • 4
  • 17
2
votes
1 answer

Is there a way to setup a field-level authorisation on FaunaDB + GraphQL?

I'm having troubles finding a way to hide user emails from everyone, except the owner (user has access to only his email). Is there a way to hide a certain document field, for a certain roles? Here is an example I found that creates a role with…
Mike M
  • 21
  • 3
2
votes
3 answers

Nuxt appolo module How to send authorization header?

I try to use nux.js with apollo. I have to send an authorization header.In my nuxt.config.js Itry this : apollo: { clientConfigs: { default: { httpEndpoint: 'https://graphql.fauna.com/graphql', headers: { …
modogo2000
  • 39
  • 5
2
votes
2 answers

Re-render Child Compondents React

Is it possible to re-render one or both of a component's children if one of them updates? I have a component that looks like this: const ContributeBody = () => (
Tithos
  • 1,191
  • 4
  • 17
  • 40
2
votes
1 answer

Load FaunaDB documents within date range

I have a collection of meals which contain a date field 'date'. I want to query all meals within a specific date range. I struggle to build a FQL query that returns the whole documents for the use in a user generated function to be consumed in a…
Pascal Mathys
  • 609
  • 1
  • 9
  • 17
2
votes
1 answer

How can I attach a collection to the database?

I can create faunadb database with python API as follows: client.query(q.create_database({ "name": "annuvin" })) Also, I can create collection as follows: client.query(q.create_collection({ "name": "spells" })) So, how can I attach "spells"…
Ueda Takeyuki
  • 721
  • 10
  • 26
2
votes
1 answer

How can I access to the content of my Get request using lambda function

I need to get object instance stored in my faunaDB DB, but I can't get his content in my front I tried to identify problem with console logs but... Here is my lambda function /* code from functions/todos-read.js */ import faunadb from…
Math73100
  • 175
  • 8
1
vote
0 answers

I want to join two collections in faunadb using common field

I have two collections with users and another with jobs. Users Collection: { "ref": Ref(Collection("users"), "365794904000954449"), "ts": 1685108055020000, "data": { "name": "srinivas", "location": "sattenapalli" } } Jobs…
1
vote
1 answer

Cannot return documents based off a sorted index using Fauna DB

I'm bumbling my way through adding a back-end to my site and have decided to get acquainted with graphQL. I may be structuring things totally the wrong way, however from following some tutorials I have a React front-end (hosted on Vercel), so I have…
edhog
  • 513
  • 2
  • 6
  • 25
1
vote
1 answer

How to query on ref in Faunadb?

I have data like this { "ref": Ref(Collection("categories"), "1"), "data": { "title": "Game" } } And [ { "ref": Ref(Collection("courses"), "1"), "data": { "categoryRef": Ref(Collection("categories"), "1"), "courseTitle":…
mjz
  • 23
  • 5
1
vote
1 answer

Query all collection documents and select data to query specific documents from another collection using Fauna and FQL

I have a use case where I would like to query all connections from the connections collection, and at the same time find the right document using employerId and employeeId from their respective collections (employer and employee collection) using…
Mathias Riis Sorensen
  • 504
  • 3
  • 13
  • 34
1
vote
0 answers

How can I close/stop a FaunaDB stream?

I am able to start a FaunaDB stream. The user enters a room name and the function setupStream is called Once a stream is started, the clock is ticking and resources are being used. I would like to able to stop the stream when the user has been…
Psionman
  • 3,084
  • 1
  • 32
  • 65
1
vote
1 answer

How access Fauna's "after" cursors in Next.js API routes

I am building an application using Next.Js and Fauna where when a user visits the /accounts route, it fetches Next.js API route /api/fauna/accounts which makes a query to Fauna to get all the accounts the user owns then returns that response to the…
Rtroman14
  • 168
  • 1
  • 8
1
vote
1 answer

Cloudflare pages worker error when running wrangler dev

I'm following this tutorial (to get cloudflare pages working with fauna db), but when I get to the chapter "Testing and deploying the Worker" and try to run wrangler dev (which will run npm run build, which in turn runs worktop build index.js) I get…