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

    daniele

    11/12/2017, 7:01 PM
    example : fetch airlines, delete airline ... then?
  • r

    rein

    11/12/2017, 7:01 PM
    hav eyou tried looking at howtographql.com ?
  • r

    rein

    11/12/2017, 7:02 PM
    there is a good tutorial about the combination of graphql and react
  • d

    daniele

    11/12/2017, 7:02 PM
    is angular 😞
  • r

    rein

    11/12/2017, 7:02 PM
    and apollo for client side
  • r

    rein

    11/12/2017, 7:02 PM
    you mean your code is angular?
  • d

    daniele

    11/12/2017, 7:02 PM
    si
  • r

    rein

    11/12/2017, 7:03 PM
    maybe give this a shot
  • r

    rein

    11/12/2017, 7:03 PM
    https://github.com/apollographql/apollo-angular
  • d

    daniele

    11/12/2017, 7:03 PM
    yeah is where I'm looking right now
  • r

    rein

    11/12/2017, 7:03 PM
    also, maybe read up on the apollo website, I would suggest you use somethin glike readQuery and writeQuery
  • d

    daniele

    11/12/2017, 7:03 PM
    but sorry you never do fetch and then delete something?
  • r

    rein

    11/12/2017, 7:03 PM
    I always use apollo for that stuff
  • d

    daniele

    11/12/2017, 7:04 PM
    and when you delete an item how you do that?
  • d

    daniele

    11/12/2017, 7:04 PM
    Copy code
    public deleteAirline(airline: DeleteAirline): Observable<any> {
            return this.apollo.mutate({
                mutation: gql`
                    mutation($id:ID!) {
                        deleteAirline(id: $id){
                            id
                        }
                    }
                `,
                variables: {
                    id: airline.id
                }
            });
        }
  • r

    rein

    11/12/2017, 7:04 PM
    same thing, readQuery and writeQuery
  • r

    rein

    11/12/2017, 7:04 PM
    really, take a look at the apollo docs first
  • d

    daniele

    11/12/2017, 7:05 PM
    kk
  • r

    rein

    11/12/2017, 7:05 PM
    there are a lot of helpers that can make it easier for you
  • d

    daniele

    11/12/2017, 7:06 PM
    ok thanks a lot
  • d

    daniele

    11/12/2017, 7:40 PM
    @rein it works super well
  • r

    rein

    11/12/2017, 7:40 PM
    glad to hear that!
  • r

    rein

    11/12/2017, 7:40 PM
    🙂
  • d

    daniele

    11/12/2017, 7:41 PM
    I'm just a bit scared of this approach because if the calculation is not correct you'll never know if you did good until you don't refresh
  • p

    peterp

    11/12/2017, 8:57 PM
    can I create custom resolvers nested under
    user
    ?
  • p

    peterp

    11/12/2017, 8:58 PM
    Copy code
    user {
       getSomethingCustom
    }
    • 1
    • 1
  • p

    peterp

    11/12/2017, 8:58 PM
    b/c my problem is that
    userId
    is not available fast enough for me to make the query
  • d

    daniele

    11/12/2017, 9:42 PM
    I think I start to fall in love with graphql
  • d

    daniele

    11/12/2017, 9:43 PM
    the only thing that still I'm struggling to understand is when to use the functions
  • d

    daniele

    11/12/2017, 9:43 PM
    for example:
1...423424425...637Latest