Rashmi Bidanta
10/23/2019, 1:11 PMRashmi Bidanta
10/23/2019, 2:51 PMCarl Bowen
10/23/2019, 5:56 PMCorey Snyder
10/23/2019, 6:00 PMtype
property. Now I’m starting on the piece where DroneBuilds
can be constructed of those parts.
type DroneBuild{
id: ID! @id
frame: Product @relation(name: "DroneBuildFrame", onDelete: SET_NULL) # When a drone build is deleted, I don't care for anything to happen with the product. Does this need to be defined anyway?
}
type Product{
id: ID! @id
...... lots more fields......
type: ProductType! # FLIGHT_CONTROLLER, FRAME, ETC
flightController: FlightController @relation(name: "ProductFlightController", link: TABLE, onDelete: CASCADE)
motor: Motor @relation(name: "ProductMotor", link: TABLE, onDelete: CASCADE)
frame: Frame @relation(name: "ProductFrame", link: TABLE, onDelete: CASCADE)
... Lots more product specific fields ...
#### NEW FIELDS
droneBuildsFrame: [DroneBuild] @relation(name: "DroneBuildFrame", onDelete: SET_NULL) # When a product is deleted, I absolutely want it nulled out on the drone build so it doesn't throw errors trying to retrieve a part that is gone.
}
LC Carrier
10/23/2019, 10:48 PMRicco
10/23/2019, 11:33 PMLuke
10/24/2019, 3:09 AMlift
to generate the initial DB tables ?Sohail Khan
10/24/2019, 5:32 AMjavascript
{
...otherFields,
area: {
type: "Polygon",
coordinates: [
[
[longitude(float), latitude(float)],
...
[longitude(float), latitude(float)]
]
]
}
}
EXCEPT Json format
but the problem with JSON is the Prisma store JSON as a string that means I cannot create an index for that field to run geospatial queries with native MongoDB (since as far as I know there is no way to do a geospatial query with Prisma).
Now let's say if I do all thing from inserting, updating, reading data from native MongoDB for specific that data along with side Prisma then when I run prisma deploy
it will wipe out all my data which I wrote manually to the database without in contact with Prisma,
and since I wrote most of my resolvers with Prisma now I cannot write all of them in native MongoDB(or using other ORM or library) due to project deadline,
now, what am I supposed to do?
Versions (please complete the following information):
- Connector: MongoDB
- Prisma Server: 1.34.0
- prisma
CLI: prisma/1.34.10 (linux-x64) node-v10.16.3
- OS: Ubuntu 19.04
- other dependencies: prisma-client
Zane Helton
10/24/2019, 5:48 AMconst handler = extensionStack && extensionStack.willResolveField(source, args, context, info);
// If no resolver has been defined for a field, use the default field resolver
// (which matches the behavior of graphql-js when there is no explicit resolve function defined).
// TODO: Find a way to respect custom field resolvers, see <https://github.com/graphql/graphql-js/pull/865>
try {
const result = (fieldResolver || defaultFieldResolver)(source, args, context, info);
Jesper O. Christensen
10/24/2019, 7:00 AMjoar
10/24/2019, 8:06 AMSELECT * FROM
which is less than idealNaman Singh
10/24/2019, 9:38 AMSohail Khan
10/24/2019, 11:09 AMSohail Khan
10/24/2019, 11:09 AMmongodump --host <from_host> --db <from_db> --archive | mongorestore --host <to_host> --archive
Naman Singh
10/24/2019, 11:23 AMHansen
10/24/2019, 2:18 PMHansen
10/24/2019, 2:18 PMHansen
10/24/2019, 2:20 PMMark Cahill
10/24/2019, 5:33 PMGlobolobo
10/24/2019, 8:50 PMintrospect
?isemaj
10/24/2019, 9:14 PMJames
10/25/2019, 10:04 AMStudent
and Class
types. A student can belong to many classes and a class has many students. That's easy to do, but what if I want to have an extra column on the studentOnClass table. Let's say I want to assign a seat number to every student in each class. How can I do it?kubo.motyl
10/25/2019, 3:27 PMZane Helton
10/25/2019, 5:28 PMevondev
10/27/2019, 9:56 AMBasix
10/27/2019, 4:00 PM@id
field if I already have a unique field in the model?lucid_frog
10/27/2019, 6:23 PMprisma.postsConnection({
first: 2,
skip: 2,
})
I would expect this to return the following:
{ nodes: [{...}, {...}], pageInfo: { hasNextPage: true, hasPreviousPage: true, endCursor: "...", startCursor: "..."} }
however, the hasPreviousPage
is always false
. Don’t know if feature doesn’t work or if I’m missing somethingLarry
10/27/2019, 7:48 PMisemaj
10/28/2019, 7:08 AMEhsan Sarshar
10/28/2019, 2:30 PM