mrboutte
05/11/2018, 1:41 AMJim
05/11/2018, 3:01 AMtype User {
id: ID! @unique
picture: String
}
schema.graphql:
type User {
id: ID!
picture: String
}
type Query {
user(id: ID!): User
}
My resolver:
async user(parent, args, ctx, info) {
const { id } = args;
const result = await ctx.db.query.user({ where: { id } }, info);
return result;
},
React component:
export const USER_QUERY = gql`
query UserQuery($userId: ID!) {
user(id: $userId) {
id
picture
}
}
`;
export default compose(
graphql(USER_QUERY, {
name: 'USER_QUERY',
options: props => {
return {
variables: {
userId: 'cjgylfv6y004h0958tx9d8j9v',
},
};
},
}),
)(UserPic);
Lotafak
05/11/2018, 6:31 AMUy Quoc Ton Tran
05/11/2018, 7:53 AMrein
05/11/2018, 8:30 AMprisma cluster add
, which works fine but the cluster does not appear in my options when I want to deploy a new service. Am I missing something? Just following the Digital Ocean tutorial on prisma.ioKhoa Huynh
05/11/2018, 9:27 AMpicosam
05/11/2018, 10:52 AMgraphql get-schema --project prisma
or graphql prepare
: ✖ Syntax Error: Expected Name, found }
pettanko
05/11/2018, 1:15 PMGudmund
05/11/2018, 1:45 PMVakrim
05/11/2018, 2:02 PMprisma-binding
to 2.0.0, a I think there is a issue with it exists
. It looks like it needs where
key now (exists.Project({where: {id }})
instead of exists.Project({id})
) Can someone confirm it?wesbos
05/11/2018, 3:01 PMprisma deploy
- is it possible to specify the name of the .env
file?wesbos
05/11/2018, 3:01 PMrequire('dotenv').config({ path: 'variables.env' });
wesbos
05/11/2018, 3:02 PM.env
im not sure how to change thatjangerhofer
05/11/2018, 3:18 PMPlace
as such:
type Place {
id: ID! @unique
city : String!
...
}
and subsequently wish to retrieve a list of unique cities, is there a way to do this without writing a one-off query like the following?
Query : {
cities : [String]
}
i.e. Is there a built-in method for querying distinct values? The closest functionality I could find is the as-of-yet un-implemented group by
query in this ticket. https://github.com/graphcool/prisma/issues/1312wesbos
05/11/2018, 3:35 PMendpoint: <https://us1.prisma.sh/wesbos/sick-fits/${env:PRISMA_STAGE}>
datamodel: datamodel.graphql
secret: ${env:PRISMA_SECRET}
I’m getting `Error: No Prisma endpoint found. Please provide the endpoint
constructor option.`steveb
05/11/2018, 4:04 PMpettanko
05/11/2018, 4:18 PMawoyotoyin
05/11/2018, 5:15 PMjeffbski
05/11/2018, 5:29 PMjeffbski
05/11/2018, 5:30 PMjeffbski
05/11/2018, 5:38 PMmehdyouras
05/11/2018, 6:03 PMvirtualirfan
05/11/2018, 6:13 PMvirtualirfan
05/11/2018, 7:31 PMPieter
05/11/2018, 7:32 PM"errors": [
{
"message": "Cannot read property 'args' of undefined",
"locations": [
{
"line": 2,
"column": 3
}
],
Pieter
05/11/2018, 7:32 PMPieter
05/11/2018, 7:32 PMPieter
05/11/2018, 7:33 PMdanielrasmuson
05/11/2018, 7:46 PMStephen Jensen
05/11/2018, 7:57 PMcontext
but they return as 500 errors with serverless.