Skip to content

Commit daa865f

Browse files
authored
1 parent 216d968 commit daa865f

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

examples/with-fauna/lib/fauna.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
import 'server-only'
2-
import {
3-
Client,
4-
fql,
5-
QuerySuccess,
6-
QueryValueObject,
7-
QueryFailure,
8-
} from 'fauna'
2+
import { Client, fql, QuerySuccess, QueryValueObject } from 'fauna'
93

104
const client = new Client({
115
secret: process.env.FAUNA_CLIENT_SECRET,
@@ -17,7 +11,7 @@ export const getAllEntries = async () => {
1711
Entry.all()
1812
`)
1913
return dbresponse.data.data
20-
} catch (error: QueryFailure | any) {
14+
} catch (error: any) {
2115
throw new Error(error.message)
2216
}
2317
}
@@ -31,7 +25,7 @@ export const createEntry = async (name: string, message: string) => {
3125
createdAt: Time.now(),
3226
})`)
3327
return dbresponse.data
34-
} catch (error: QueryFailure | any) {
28+
} catch (error: any) {
3529
throw new Error(error.message)
3630
}
3731
}

0 commit comments

Comments
 (0)