Showing
3 changed files
with
0 additions
and
85 deletions
ReactNative/graphql/mutations/buyFranchisePlayer/index.ts
deleted
100644 → 0
1 | -import { gql } from '@apollo/client'; | |
2 | - | |
3 | -// eslint-disable-next-line import/prefer-default-export | |
4 | -export const BUY_FRANCHISE_PLAYER = gql` | |
5 | - mutation CreateFranchisePlayers( | |
6 | - $franchiseId: String! | |
7 | - $playerId: String! | |
8 | - $rosterSpotIndex: Int! | |
9 | - ) { | |
10 | - createNflFranchisePlayer( | |
11 | - data: { | |
12 | - franchiseId: $franchiseId | |
13 | - playerId: $playerId | |
14 | - rosterSpotIndex: $rosterSpotIndex | |
15 | - } | |
16 | - ) { | |
17 | - id | |
18 | - playerId | |
19 | - franchiseId | |
20 | - rosterSpotIndex | |
21 | - buyPrice | |
22 | - } | |
23 | - } | |
24 | -`; |
ReactNative/graphql/queries/findFranchisePlayers/index.ts
deleted
100644 → 0
1 | -import { gql } from '@apollo/client'; | |
2 | -import apolloClient from '../../../store/apolloClient'; | |
3 | - | |
4 | -// eslint-disable-next-line import/prefer-default-export | |
5 | -export const FIND_FRANCHISE_PLAYERS = gql` | |
6 | - query FindFranchisePlayers($franchiseId: String!) { | |
7 | - findNflFranchisePlayers(filter: { franchiseId: { eq: $franchiseId } }) { | |
8 | - nodes { | |
9 | - id | |
10 | - playerId | |
11 | - franchiseId | |
12 | - rosterSpotIndex | |
13 | - buyPrice | |
14 | - } | |
15 | - } | |
16 | - } | |
17 | -`; | |
18 | - | |
19 | -export default async (franchiseId: string) => { | |
20 | - try { | |
21 | - await apolloClient.query({ | |
22 | - query: FIND_FRANCHISE_PLAYERS, | |
23 | - variables: { franchiseId }, | |
24 | - fetchPolicy: 'network-only' | |
25 | - }); | |
26 | - return null; | |
27 | - } catch (e) { | |
28 | - return null; | |
29 | - } | |
30 | -}; |
ReactNative/graphql/queries/findUserSeasonFranchise/index.ts
deleted
100644 → 0
1 | -import { gql } from '@apollo/client'; | |
2 | -import { get } from 'lodash/fp'; | |
3 | -import apolloClient from '../../../store/apolloClient'; | |
4 | - | |
5 | -export const FIND_USER_CURRENT_NFL_SEASON_FRANCHISE = gql` | |
6 | - query FindNflSeasonFranchises($userId: String!) { | |
7 | - currentNflSeason { | |
8 | - id | |
9 | - franchises(filter: { ownerId: { eq: $userId } }) { | |
10 | - nodes { | |
11 | - id | |
12 | - name | |
13 | - fzCash | |
14 | - } | |
15 | - } | |
16 | - } | |
17 | - } | |
18 | -`; | |
19 | - | |
20 | -export default async (userId: string) => { | |
21 | - try { | |
22 | - const { data } = await apolloClient.query({ | |
23 | - query: FIND_USER_CURRENT_NFL_SEASON_FRANCHISE, | |
24 | - variables: { userId }, | |
25 | - fetchPolicy: 'network-only' | |
26 | - }); | |
27 | - return get('currentNflSeason.franchises.nodes.0', data); | |
28 | - } catch (e) { | |
29 | - return null; | |
30 | - } | |
31 | -}; |