Thinking out loud: I may use Gatsby for the articl...
# prisma-whats-new
r
Thinking out loud: I may use Gatsby for the article/blog publishing side of things, thought this will create a division between ‘app’ and ‘blog’ parts of my app. I’ll have to think about whether that’s a problem.
n
@ryand sounds exciting! Would love to hear how this is going for you
r
I found this, but the repo seems to be gone: https://www.npmjs.com/package/markdown-to-graphcool
I’d really prefer an approach that lets me use Graphcool exclusively. If I can auther posts in markdown and then just drop them into Graphcool that works.
n
Ah that's the tool we use to deploy our markdown files to Graphcool. It's specially tailored to our use case though.
r
I’d appreciate suggestions on how Graphcool might advise users solve the problem of combining blog/article content with the rest of their Graphcool data. I’m sure I’m not alone 😉
👍 1
Another option might be to use a headless CMS like Contentful. That just introduces another (non-GraphQL) data source and the associated complexity.
h
just make type Blog and have field autor with User then add content String title String date Date?
you can add thumbnail and rest stuff on top of it 🙂
make react router blog/:title
blog query all Blogs and you can have it running in one day 🙂
n
@ryand what kind of capabilities are you looking for? It's difficult for me to discuss this in generic terms
r
@nilan what I’m looking for is the ability to have Posts in Graphcool, where the body of each Post can contain markup (images/links/embeds) as needed.
👍 1
If a string field can contain markup then perhaps @huv1k has the right idea.
n
we solve this in our documentation with a base64 encoded string field
we use Markdown plus some additional elements to render the playground for example
r
Request: a blog post tutorial on how you use Graphcool to create your blog posts and tutorials 😉
👍 2
n
that's a great idea!
❤️ 1
Inception 😆
👍 1
h
ryand you can add for example https://draftjs.org/ on top of it so you have rich editor 🙂
👍 1
r
It looks like I can just paste markup into a String field and use
dangerouslySetInnerHTML
where I want it in my React component. That will hold me over until I learn a better way.
h
Yea, gatsby is parsing for exampel makrdown and doing it same way 🙂