https://www.prisma.io/ logo
Join Slack
Powered by
# prisma-whats-new
  • f

    Fitch

    11/15/2017, 6:17 PM
    Is there a way to filter out the blank returns in a filter .. or do it in js XD
    n
    • 2
    • 12
  • t

    timwis

    11/15/2017, 7:55 PM
    Hey folks, I’d like my auth function to return a
    user: User!
    property, allowing the client to specify which fields, and even get a related object. Is that possible? All the examples return explicit fields only in a custom object.
    n
    • 2
    • 2
  • k

    Kat

    11/15/2017, 9:51 PM
    anyone here using Vue with graphcool? 🙂
  • k

    Kat

    11/15/2017, 9:51 PM
    or Nuxt
  • b

    bobbyt

    11/15/2017, 10:02 PM
    Does anyone have a workaround for mutations that both add and update an array of objects, per https://www.graph.cool/forum/t/how-do-i-add-an-array-of-objects-to-a-mutation-in-apollo-react/365/6 ?
    Combined
    You can also use tags and tagsIds in the same mutation, this would connect the new Tutorial node to all the tags in tagsIds and connect it to the new tags in tags. This is what you want to do if you want to only allow tags with a unique text, so for a new Tutorial, there will likely be some tags that already exists, and some that need to be created.
    In my case, I am trying to update a set of tags on a Post. I am able to pass both
    tags
    (new tags) and
    tagsIds
    (ids of tags that already exist) to my mutation:
    Copy code
    const updatePostQuery = ({
      id,
      createdById,
      timestamp,
      imageUrl,
      description,
      tags,
      tagsIds,
    }) => ({
      mutation: gql`
        mutation updatePost(
          $id: ID!
          $createdById: ID!
          $timestamp: DateTime!
          $imageUrl: String
          $description: String
          $tags: [PosttagsTag!]!
          $tagsIds: [ID!]
        ) {
          updatePost(
            id: $id
            createdById: $createdById
            timestamp: $timestamp
            imageUrl: $imageUrl
            description: $description
            tags: $tags
            tagsIds: $tagsIds
          ) {
            id
            timestamp
            description
            tags {
              id
              tag
            }
            imageUrl
            createdBy {
              id
              username
            }
          }
        }
      `,
      variables: {
        id,
        createdById,
        timestamp,
        imageUrl,
        description,
        tags,
        tagsIds,
      },
    });
    However, I get the following error:
    Copy code
    ERROR:  [Error: GraphQL error: A unique constraint would be violated on Post. Details: Sorry, no more details available.]
    While the new tag is added successfully the mutation seems to be trying to append the ids of the existing tags to the field instead of updating their values?
  • s

    sebastien

    11/15/2017, 10:04 PM
    Hey Graphcool team, thanks so much for releasing the Angular + Apollo 2.0 track of the How to GraphQL! 🎉 https://www.howtographql.com/angular-apollo/0-introduction/ Happy to see Angular getting some love!
    💚 1
    🎉 2
    🦜 2
    ❤️ 1
  • m

    Miezan

    11/15/2017, 11:45 PM
    Hey Guys I’m trying some very simple subscriptions in the playground and it doesn’t seems to be returning a node on each created or updated entry - anyone else experiencing this ?
    n
    • 2
    • 4
  • a

    amanda_hogan

    11/16/2017, 1:35 AM
    Hey guys, just starting out on graphcool and I’m trying to fetch certain nodes of a specific type. for example I am sending
    Copy code
    query {
      allAnswers(filter: {
        keywords_contains: "location"
      }) {
        response
      }
    }
    This is an example of the Type in the schema
    Copy code
    type Answer @model {
      id: ID! @isUnique
      intent: String!
      keywords: [String!]
      response: String!
      subject: String! @isUnique
      timeStamp: DateTime!
    }
    and I am getting this error
    Copy code
    {
      "data": null,
      "errors": [
        {
          "message": "Argument 'filter' expected type 'AnswerFilter' but got: {keywords_contains: \"location\"}. Reason: 'keywords_contains' Field 'keywords_contains' is not defined in the input type 'AnswerFilter'. (line 2, column 22):\n  allAnswers(filter: {\n                     ^\n (line 3, column 5):\n    keywords_contains: \"location\"\n    ^",
          "locations": [
            {
              "line": 2,
              "column": 22
            },
            {
              "line": 3,
              "column": 5
            }
          ]
        }
      ]
    }
    can someone point out where I am going wrong.
    i
    n
    • 3
    • 8
  • v

    virtualirfan

    11/16/2017, 2:03 AM
    Sorry, resurrecting an older half-done project. IIRC, used to be that a new
    Copy code
    Type
    in the Console would automatically create and maintain the
    Copy code
    createdAt
    and
    Copy code
    updatedAt
    fields. Am I misremembering? Now, it looks like they are there for the system types but not the user types. What gives?
    i
    • 2
    • 2
  • g

    gauravkaushik

    11/16/2017, 2:16 AM
    any ideas how to delete graphcool logs in the docker container?
  • m

    MoonTahoe

    11/16/2017, 3:38 AM
    I am having some problems implementing github authorization. I am a little stuck. Can anyone answer this question: https://stackoverflow.com/questions/47321158/github-login-with-graphcool
    a
    • 2
    • 7
  • f

    Fitch

    11/16/2017, 4:13 AM
    Anyone have a way to change all values in a column to 1 Enum or String?
    a
    • 2
    • 5
  • d

    divyendu

    11/16/2017, 7:12 AM
    https://github.com/graphcool/framework/issues/398 Any suggested workaround for "No CONNECT permissions" in this context?
  • m

    Maslov

    11/16/2017, 7:45 AM
    Does it possible to put default data to migrations in graphcool project?
    a
    • 2
    • 2
  • v

    Vinnie

    11/16/2017, 9:23 AM
    Once rebooted, the local target is longer recognised when I do a local deploy, e.g.
    Copy code
    No service with id 'cj9ttwnlb009h0150kg59sgb0' in account <mailto:test@test.org|test@test.org>. Please check if you are logged in to the right
     ▸    account.
    What’s right way to approach this? It is only removing the local target from
    .graphcoolrc
    ?
    a
    • 2
    • 11
  • r

    rein

    11/16/2017, 9:38 AM
    is there currently a work around for the lack of cascading deletions?
  • t

    tfiwm

    11/16/2017, 10:02 AM
    does any one know how i can deploy different targets with a different graphcool.yml?
  • t

    tfiwm

    11/16/2017, 10:02 AM
    because i want to use the env in the functions but with different values for the different targets
  • d

    dtuite

    11/16/2017, 11:38 AM
    @nilan Can you please stop fraudulently charging my card for Graphcool. I cancelled my account on your website and emailled your support 2 months ago and have been charged twice since then. What do I have to do to get Graphcool to stop charging me?
    n
    • 2
    • 1
  • p

    pokorson

    11/16/2017, 1:24 PM
    what's the best way to check why resolver function cannot be deployed ? 😕
  • p

    pokorson

    11/16/2017, 1:25 PM
    Copy code
    Global
        ✖ Could not create serverless function for 'authenticate'. Ensure that the code is valid
  • p

    proteus

    11/16/2017, 1:49 PM
    Hello. I'm getting an unspecified error.
  • p

    proteus

    11/16/2017, 1:49 PM
    With no console output.
  • p

    proteus

    11/16/2017, 1:50 PM
    And a message to contact you from the console, but the fab is not showing.
  • b

    bobbyt

    11/16/2017, 1:52 PM
    Per my prior message, what I am looking for is something akin to an
    upsert
    when issuing a mutation on a nested one-to-many field. In my case, I have a
    Post
    type than has a
    tag
    field which can be associated with many `Tag`s. The issue I am running into is when updating a
    Post
    - I need to both create new `Tag`s for tags that do not yet exist, and for ones that do only provide an association to existing
    Tag
    ids. Here is my schema:
    Copy code
    type Post @model {
      createdAt: DateTime!
      createdBy: User @relation(name: "PostsByUser")
      description: String @defaultValue(value: "''")
      id: ID! @isUnique
      tags: [Tag!]! @relation(name: "TagsOfPost")
      ...
    }
    Copy code
    type Tag @model {
      id: ID! @isUnique
      tag: String!
      createdBy: User @relation(name: "TagsByUser")
      createdAt: DateTime!
      posts: [Post!]! @relation(name: "TagsOfPost")
    }
    I came across this post by @nilan but it's not clear how to implement the combined method he outlines: https://www.graph.cool/forum/t/how-do-i-add-an-array-of-objects-to-a-mutation-in-apollo-react/365/6
    Combined
    You can also use tags and tagsIds in the same mutation, this would connect the new Tutorial node to all the tags in tagsIds and connect it to the new tags in tags. This is what you want to do if you want to only allow tags with a unique text, so for a new Tutorial, there will likely be some tags that already exists, and some that need to be created.
    Is it currently impossible to do this with one mutation? Would a second mutation be required to add the associations to existing
    Tag
    ids? Thanks!
  • m

    mwickett

    11/16/2017, 2:06 PM
    Anyone else getting network errors from Graphcool?
  • m

    mwickett

    11/16/2017, 2:07 PM
    Nevermind - hiccup
  • j

    John Livingston

    11/16/2017, 2:43 PM
    Graphcool site appears to be broken...
  • j

    John Livingston

    11/16/2017, 2:43 PM
  • n

    nilan

    11/16/2017, 2:48 PM
    @John Livingston please refer to https://netlifystatus.com/
    👍 1
    j
    • 2
    • 4
1...430431432...637Latest