Unverified Commit 47cb2364 authored by Trevor Finn's avatar Trevor Finn Committed by GitHub

Fix export issue in with-fauna example (#38812)

* Fix export issue in with-fauna example

* lint fix

* Apply suggestions from code review

* update
Co-authored-by: 's avatarJJ Kasper <jj@jjsweb.site>
parent 81c3cd68
const resolveDbDomain = () => {
return process.env.FAUNA_DB_DOMAIN ?? 'db.fauna.com'
}
module.exports = {
resolveDbDomain,
}
import { GraphQLClient, gql } from 'graphql-request'
import { resolveDbDomain } from '../scripts/setup'
import { resolveDbDomain } from './constants'
const CLIENT_SECRET =
process.env.FAUNA_ADMIN_KEY || process.env.FAUNA_CLIENT_SECRET
......
......@@ -5,6 +5,7 @@ const readline = require('readline')
const request = require('request')
const { Client, query: Q } = require('faunadb')
const streamToPromise = require('stream-to-promise')
const { resolveDbDomain } = require('../lib/constants')
const MakeLatestEntriesIndex = () =>
Q.CreateIndex({
......@@ -114,10 +115,6 @@ const resolveAdminKey = () => {
})
}
const resolveDbDomain = () => {
return process.env.FAUNA_DB_DOMAIN ?? 'db.fauna.com'
}
const importSchema = (adminKey) => {
let domain = resolveDbDomain().replace('db', 'graphql')
return streamToPromise(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment