question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Replace datamodel

See original GitHub issue

The current examples are based on a weird datamodel which looks like the following

type Cat {
  id: ID! @unique
  name: String!
  color: String!
  favBrother: Cat
}

type Master {
  id: ID! @unique
  catz: [Cat!]!
}

I suggest to base it on the following data model instead:

Minimal

type Post {
  id: ID! @unique
  isPublished: Boolean! @default(value: false)
  title: String!
  content: String!
}

Basic

type Post {
  id: ID! @unique
  createdAt: DateTime!
  updatedAt: DateTime!
  isPublished: Boolean! @default(value: "false")
  title: String!
  content: String!
  author: User!
}

type User {
  id: ID! @unique
  email: String! @unique
  password: String!
  name: String!
  posts: [Post!]!
}

This also means the resulting application should be adjusted to match the new datamodel.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
abhiaiyer91commented, Sep 16, 2018

All prev data models using the Cat/Master setup is now using this data model

1reaction
brikoucommented, Sep 11, 2018

IMO Post.content or Post.body is better than Post.text, because text may be confusing as too generic and remind a datatype.

Read more comments on GitHub >

github_iconTop Results From Across the Web

OAC : How To "replace Datamodel" If Oracle Analytics Cloud ...
Is there anyway to change the RPD on command line? Solution. Sign In. To view full details, sign in with your My Oracle...
Read more >
Replace a table in data model - Microsoft Power BI Community
Solved: I built a report with a quite complex data model. Now I need to replace a table (involved in multiple relationships) with...
Read more >
Change - Splunk Documentation
The Change data model is built to make administrator type changes that include changes in devices, servers, Cloud environments, and endpoint ...
Read more >
Change Datamodel with JavaScript - Prisma 1
Adjust the datamodel and update your Prisma API; Regenerate your Prisma client; Create two database records in a single transaction; Query relational data....
Read more >
Make changes to an existing data source in Power Pivot
After you create a connection to an external data source in a Data Model, you can use the Power Pivot add-in to change:...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found