Anyone been through the process of creating unique...
# prisma-whats-new
m
Anyone been through the process of creating unique slugs? I’ve got a function to create a slug, but I need some help thinking through the process to check a new slug against all existing ones to ensure it’s unique - can I run a query server side?
n
yes, you can using
graphql-request
🙂
m
ahh, thanks!
n
just note that our functions don't support the
const { a } = require('b')
syntax yet
m
So we have to use
import { a } from 'b'
?
n
no 😄
const b = require('b')
const a = b.a
m
Oh sorry. I see
hah.
n
haha this gets me every time 😄
a
should work with
'use latest'
though...
n
does it?
m
That’s interesting…
a
Just tested it.
const { a } = require('b')
works with
'use latest'
n
🎉
a
m
Thanks for trying that @agartha!