-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #882 from CruGlobal/7856-native-rails-api
[MPDX-7856] Use Rails GraphQL whenever possible
- Loading branch information
Showing
160 changed files
with
1,206 additions
and
1,984 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,8 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
digest='graphql-digest.txt' | ||
if [ -e $digest ]; then | ||
previous_hash=`cat $digest` | ||
current_hash=`cat $(find . -type f -name "*.graphql") | openssl dgst -sha256` | ||
if [ "$previous_hash" != "$current_hash" ]; then | ||
# Only update the hash if the gql codegen succeeded | ||
yarn gql && yarn gql:server && echo $current_hash > $digest | ||
fi | ||
else | ||
current_hash=`cat $(find . -type f -name "*.graphql") | openssl dgst -sha256` | ||
yarn gql && yarn gql:server && echo $current_hash > $digest | ||
digest_file='src/graphql/graphql-digest.txt' | ||
current_hash=`cat $(find . -type f -name "*.graphql") | openssl dgst -sha256` | ||
if [ ! -e $digest_file ] || [ `cat $digest_file` != "$current_hash" ]; then | ||
# Only update the hash if the gql codegen succeeded | ||
yarn gql && echo $current_hash > $digest_file | ||
fi |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-144 KB
.yarn/cache/@apollo-query-graphs-npm-2.1.3-440b090f30-919029ce34.zip
Binary file not shown.
Binary file removed
BIN
-163 KB
.yarn/cache/@apollo-query-planner-npm-2.1.3-fe95fb0049-e24fc504f9.zip
Binary file not shown.
Binary file removed
BIN
-6.61 KB
.yarn/cache/@apollo-server-gateway-interface-npm-1.0.3-9efe0c0ada-f6bb31e703.zip
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-68.5 KB
.yarn/cache/@apollo-usage-reporting-protobuf-npm-4.0.0-alpha.1-da825f9f0a-a6a3ce0ab8.zip
Binary file not shown.
Binary file removed
BIN
-4.95 KB
.yarn/cache/@apollo-utils.createhash-npm-1.1.0-90a8271bd0-46790cb7af.zip
Binary file not shown.
Binary file removed
BIN
-6.89 KB
.yarn/cache/@apollo-utils.fetcher-npm-1.1.0-62150fc9e6-304f564b60.zip
Binary file not shown.
Binary file removed
BIN
-3.69 KB
.yarn/cache/@apollo-utils.isnodelike-npm-1.1.0-12129dd4a7-66d620b9db.zip
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-9.68 KB
.yarn/cache/apollo-server-types-npm-3.6.2-04ffce252b-410d7c0e6c.zip
Binary file not shown.
Binary file removed
BIN
-7.61 KB
.yarn/cache/available-typed-arrays-npm-1.0.5-88f321e4d3-20eb47b3ce.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { Session } from 'next-auth'; | ||
|
||
export const session: Session = { | ||
expires: '2021-10-28T14:48:20.897Z', | ||
user: { | ||
name: 'First Last', | ||
email: '[email protected]', | ||
apiToken: 'apiToken', | ||
userID: 'user-1', | ||
admin: false, | ||
developer: false, | ||
impersonating: false, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,11 @@ | ||
import '@testing-library/jest-dom/extend-expect'; | ||
import 'isomorphic-fetch'; | ||
import { Settings } from 'luxon'; | ||
import { Session } from 'next-auth'; | ||
import { type useSession } from 'next-auth/react'; | ||
import { session } from '__tests__/fixtures/session'; | ||
import { toHaveGraphqlOperation } from '../extensions/toHaveGraphqlOperation'; | ||
import matchMediaMock from './matchMediaMock'; | ||
|
||
const session: Session = { | ||
expires: '2021-10-28T14:48:20.897Z', | ||
user: { | ||
name: 'First Last', | ||
email: '[email protected]', | ||
apiToken: 'apiToken', | ||
userID: 'user-1', | ||
admin: false, | ||
developer: false, | ||
impersonating: false, | ||
}, | ||
}; | ||
|
||
jest.mock('next-auth/react', () => { | ||
return { | ||
getSession: jest.fn().mockResolvedValue(session), | ||
|
@@ -28,6 +16,7 @@ jest.mock('next-auth/react', () => { | |
data: session, | ||
update: () => Promise.resolve(null), | ||
}), | ||
signIn: jest.fn().mockResolvedValue(undefined), | ||
signOut: jest.fn().mockResolvedValue(undefined), | ||
}; | ||
}); | ||
|
@@ -50,6 +39,10 @@ window.document.createRange = (): Range => | |
} as unknown as Node, | ||
} as unknown as Range); | ||
|
||
Object.defineProperty(window, 'location', { | ||
value: { ...window.location, assign: jest.fn(), replace: jest.fn() }, | ||
}); | ||
|
||
window.HTMLElement.prototype.scrollIntoView = jest.fn(); | ||
|
||
beforeEach(() => { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,6 @@ frontend: | |
- yarn -v | ||
- yarn | ||
- yarn disable-telemetry | ||
- yarn gql:server | ||
- yarn gql | ||
build: | ||
commands: | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.