Observation: While importing data, strings that in...
# prisma-whats-new
p
Observation: While importing data, strings that include ellipsis (...) cause a "There is no such fragment..." error. Since it's not incorrect for text to include ellipses, I'd call this a bug.
n
@patrickj can you show the code? what client are you using? can you reproduce this in the playground?
p
Import modeled after the javascript examples with Lokka.
this book: { "pub_year": "1997", "title": "...But Where Are You Really From?", "summary": [""], "editions": [ { "pub_info": "Toronto: Sister Vision Press, 1997." } ] }
this mutation: const createBook = async(book, authorId) => { const result = await client.mutate(
Copy code
{
    book: createBook(
      title: "${book.title}"
      subtitle: "${book.subtitle}"
      pubYear: ${book.pub_year}
      notes: "${book.summary}"
    ) {
      id
    }
  }
)
n
I'll try to reproduce this in the playground, let me see
p
This error produced: (node:13139) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: There is no such fragment: But
Thanks! I've also come across it when importing into the notes[].
n
this looks to be a bug in Lokka
I cannot reproduce this in the playground
p
Good to know. Thanks. I think I'll refactor the import to use Apollo. That's the client I'm considering using, and it might be good to have an example of an import with it. (Unless you know of any existing ones.)
n
It's really unfortunate... I'd probably use
fetch
instead, because you don't really need the caching capabilities of Apollo when importing data 🙂
p
Thanks for that suggestion.
n
p
Thanks!
👍 1
n
I'm still not 100% sure why the observed bug occurs. let me know if you learn more about that 🙂