From 92c18f8bf75d9081f21003fe4eb127c316d96480 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Tue, 21 May 2024 14:14:02 -0600 Subject: [PATCH] Add user to shot gql --- flake.nix | 2 +- justfile | 14 ++++++++++++++ src/index.tsx | 4 ++++ src/operations/shots.gql | 3 +++ 4 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 justfile diff --git a/flake.nix b/flake.nix index abe5978..65be774 100644 --- a/flake.nix +++ b/flake.nix @@ -21,7 +21,7 @@ in with pkgs; { devShell = mkShell { - buildInputs = [nodejs yarn watchman alejandra nodePackages.prettier]; + buildInputs = [nodejs yarn watchman alejandra nodePackages.prettier just]; }; }); } diff --git a/justfile b/justfile new file mode 100644 index 0000000..facc4a2 --- /dev/null +++ b/justfile @@ -0,0 +1,14 @@ +NIX := "LD_LIBRARY_PATH='' nix" + +prettier-gql: + #!/usr/bin/env bash + set -euxo pipefail + {{NIX}} develop --impure --command prettier ./src --write + +gql-codegen: + #!/usr/bin/env bash + set -euxo pipefail + {{NIX}} develop --impure --command bash -c 'yarn install && yarn graphql-codegen' + + +gql: gql-codegen prettier-gql diff --git a/src/index.tsx b/src/index.tsx index c680e74..1730f45 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -612,6 +612,7 @@ export type GetShotsQuery = { endFrame: number; createdAt?: any | null; updatedAt?: any | null; + user?: { __typename?: "UserGQL"; id: number } | null; cueObjectFeatures?: { __typename?: "CueObjectFeaturesGQL"; cueObjectDistance?: number | null; @@ -1311,6 +1312,9 @@ export const GetShotsDocument = gql` videoId startFrame endFrame + user { + id + } createdAt @include(if: $includeCreatedAt) updatedAt @include(if: $includeUpdatedAt) cueObjectFeatures @include(if: $includeCueObjectFeatures) { diff --git a/src/operations/shots.gql b/src/operations/shots.gql index e03c13c..1a842b6 100644 --- a/src/operations/shots.gql +++ b/src/operations/shots.gql @@ -17,6 +17,9 @@ query GetShots( videoId startFrame endFrame + user { + id + } createdAt @include(if: $includeCreatedAt) updatedAt @include(if: $includeUpdatedAt) cueObjectFeatures @include(if: $includeCueObjectFeatures) {