pasa
05/03/2018, 8:55 PMnew Prismahostip.portyarn startKhoa Huynh
05/03/2018, 11:47 PMpsongpin
05/04/2018, 3:11 AMprisma initgraphql create serverdamon.chen
05/04/2018, 3:11 AMuser
05/04/2018, 3:20 AMJim
05/04/2018, 6:03 AMuser
05/04/2018, 7:28 AMJim
05/04/2018, 7:45 AMtype Location {
	id: ID! @unique
	name: String!
	machineName: String
}query {
  locations(
    where: {
      machineName: "paris"
    }
  ) {
    id
    name
    machineName
  }
}type Query {
  location: Location
  feed: [Post!]!
  drafts: [Post!]!
  post(id: ID!): Post
  locations: [Location!]!
  me: User
}location(parent, { machineName }, ctx, info) {
    return ctx.db.query.location({ where: { machineName } }, info);
  },Network error: Response not successful: Received status code 400
export const LOCATION_QUERY = gql`
  query LocationQuery {
    location(where: { machineName: "paris" }) {
      id
      name
      machineName
    }
  }
`;john
05/04/2018, 8:22 AMpicosam
05/04/2018, 9:36 AMweakky
05/04/2018, 10:09 AMhoria.ancas
05/04/2018, 11:11 AMhoria.ancas
05/04/2018, 11:11 AMJim
05/04/2018, 11:44 AMJim
05/04/2018, 1:02 PMlocation(parent, args, ctx, info) {
   const { machineName } = args;
   return ctx.db.query.locations({ where: { machineName } }, info);
 }{
  location(machineName: "london") {
    id
    name
    
  }
}{
  "data": {
    "location": [
      {
        "id": "cjgrqosbt5eum0b51hz4yqrou",
        "name": "London"
      }
    ]
  }
}{
  "data": {
    "location" {
      "id": "cjgrqosbt5eum0b51hz4yqrou",
      "name": "London"
    }
  }
}noahdavis
05/04/2018, 1:31 PMJim
05/04/2018, 1:46 PMshane
05/04/2018, 2:36 PM<Query query={MY_QUERY} fetchPolicy={'network-only'}><Query query={MY_QUERY} fetchPolicy="network-only">medelman
05/04/2018, 2:36 PMexistsconst exists = await ctx.db.exists.Media({ localSource })pettanko
05/04/2018, 3:28 PMtheom
05/04/2018, 4:12 PMThe project could not be ejected because it has enabled integrations. Please migrate all integrations to resolvers first.lawjolla
05/04/2018, 5:26 PMrafaelcorreiapoli
05/04/2018, 10:48 PMrafaelcorreiapoli
05/04/2018, 10:52 PMrafaelcorreiapoli
05/04/2018, 10:53 PMmutation {
  createAttachment(data:{
    name: "teste",
    description:"desc",
    type: ARTICLE,
    kind:WEB,
    imageUrl:"<http://www.google.com>",
    url:"<http://www.google.com>"
    organizations:{
      connect: [{
        id: "cjgsibg858lms0b06p4a6lgj4"
      }]
    }
  }) {
    id
    name
  }
}rafaelcorreiapoli
05/04/2018, 10:53 PMrafaelcorreiapoli
05/04/2018, 10:58 PMrafaelcorreiapoli
05/04/2018, 10:58 PMKhoa Huynh
05/05/2018, 12:06 AMJim
05/05/2018, 3:13 AMconst ME = gql`
  query me {
    me {
      id
    }
  }
`;
 <Query query={ME}>
          {({ loading, error, data }) => {
            if (loading) return <Loading />;
            const userisLoggedIn = error ? false : true;
            // Then I use userisLoggedIn to conditionally render stuff