matty
07/26/2017, 8:31 AMmatty
07/26/2017, 8:31 AMsignupAndAuthorize
nilan
07/26/2017, 8:31 AMmatty
07/26/2017, 8:31 AM/oauth/token
to swap username/password for an idTokennilan
07/26/2017, 8:32 AMmatty
07/26/2017, 8:33 AMlewisblackwood
07/27/2017, 9:53 AMserverless-babel-starter
(https://github.com/postlight/serverless-babel-starter). It adds Webpack, Babel, Prettier, and Jest by default and other helpers such as live-reloading of functions locally and the ability to keep functions "warm".
As I imagine Graphcool is a Lambda power user, I'd love to hear more about how you guys manage your Lambda development:
• are you using Serverless elsewhere, or just for running integration tests with Chromeless?
• how do you manage the development and deployment of Lambda functions, across multiple environments?
• are you doing CI/CD with your Lambda functions?
• any tips in general on building a great dev experience with Lambda 😅
thanks team!michaelsbradleyjr
07/27/2017, 9:30 PMcorefinder
07/28/2017, 8:10 AMshadoeblade184
07/30/2017, 8:24 AMmartin
08/02/2017, 7:40 PMmartin
08/04/2017, 6:11 PMilija_nl
08/06/2017, 7:31 AMjensandersson
08/06/2017, 10:54 AMkevinbrown
08/06/2017, 11:17 AMallTransactions
then filter and sort there. Is that correct? https://www.graph.cool/docs/reference/simple-api/ordering-by-field-vequoog7hu/joar
08/06/2017, 11:23 PM{
user {
transactions(orderBy: “date”) { id }
}
}
mj
08/07/2017, 8:18 AMmj
08/07/2017, 8:18 AMmj
08/07/2017, 8:19 AMtype Account implements Node {
name: String!
id: ID! @isUnique
v1Id: Int @isUnique
createdAt: DateTime!
updatedAt: DateTime!
logo: AccountLogo @relation(name: "LogoOnAccount")
fields: [CustomField!]! @relation(name: "CustomFieldOnAccount")
fieldsMeta: [String!]
contact: [Contact!]! @relation(name: "ContactOnAccount")
event: [Event!]! @relation(name: "EventOnAccount")
location: [Location!]! @relation(name: "LocationOnAccount")
user: [User!]! @relation(name: "UserOnAccount")
}
type User implements Node {
firstname: String!
lastname: String!
createdAt: DateTime!
id: ID! @isUnique
v1Id: Int @isUnique
updatedAt: DateTime!
siteId: Int
account: [Account!]! @relation(name: "UserOnAccount")
email: String @isUnique
password: String
}
mj
08/07/2017, 8:19 AMmj
08/07/2017, 8:20 AMquery ($user_id: ID!, $node_id: ID!) {
SomeUserExists(filter: {
AND: [
{
id: $user_id
}, {
account_some: {
id: $node_id
}
}
]
})
}
mj
08/07/2017, 8:21 AMquery {
allAccounts {
id,
name
}
}
mj
08/07/2017, 8:21 AMInsufficient Permissions
😞antho1404
08/07/2017, 8:27 AMquery($currentUserId: ID!) {
allAccounts(filter: {
user {
id: $currentUserId
}
}) {
id,
name
}
}
Your request retrieve all the accounts even the one you your user don’t have access to but when you try to read the value it’s in conflict with your rules.
At least that’s what I did in my application but I still have some kind of random Insufficient Permissions
sometimes on the creation but for the reading it works like a charm.mj
08/07/2017, 8:30 AMmj
08/07/2017, 8:30 AMmj
08/07/2017, 8:30 AMmj
08/07/2017, 8:31 AMantho1404
08/07/2017, 8:37 AMquery ($user_id: ID!, $node_id: ID!) {
SomeUserExists(filter: {
id: $user_id
account_some: {
id: $node_id
}
})
}
And yes I agree it could be perfect to fetch all the data associated to the connected user but I guess less flexiblemj
08/07/2017, 9:21 AMmutation CreateAccount(
$name: String!,
$v1Id: Int!,
$contact: [AccountcontactContact] ) {
createAccount(
name: $name
v1Id: $v1Id,
contact: $contact
) {
id
}
}
Variable ‘$contacts’ of type ‘[AccountcontactContact]’ used in position expecting type ‘[AccountcontactContact!]‘. (line 11, column 5):\n $contacts: [AccountcontactContact] ) {\n ^\n (line 15, column 16):\n contact: $contacts\n