believer/movies-graphql-postgres

View on GitHub
lib/graphql/resolvers/queries/__tests__/__snapshots__/totalByRole.spec.js.snap

Summary

Maintainability
Test Coverage
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`queries/totalByRole should get how many movies a for a specific role 1`] = `
"
      SELECT
        COUNT(distinct p.name)
      FROM 
        views AS v
        INNER JOIN movies AS m ON m.id = v.movie_id
        INNER JOIN cast_and_crew AS cac ON cac.movie_id = m.id
        INNER JOIN people AS p ON cac.person_id = p.id
      WHERE v.user_id = 2 AND cac.role_id = 1
    "
`;