-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add Elektro GraphQL fragments, queries, and components for trac…
…e management; refactor to replace Room with Trace components
- Loading branch information
Showing
27 changed files
with
6,506 additions
and
1,002 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
overwrite: true | ||
schema: "http://jhnnsrs-lab/elektro/graphql" | ||
documents: "graphql/elektro/**/*.graphql" | ||
generates: | ||
src/elektro/api/fragments.ts: | ||
plugins: | ||
- "fragment-matcher" | ||
src/elektro/api/graphql.ts: | ||
plugins: | ||
- "typescript" | ||
- "typescript-operations" | ||
- "typescript-react-apollo" | ||
config: | ||
withHooks: true | ||
reactApolloVersion: 3 | ||
apolloReactHooksImportFrom: "@/lib/elektro/funcs" | ||
|
||
src/elektro/graphql.schema.json: | ||
plugins: | ||
- "introspection" |
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,31 @@ | ||
fragment Credentials on Credentials { | ||
accessKey | ||
status | ||
secretKey | ||
bucket | ||
key | ||
sessionToken | ||
store | ||
} | ||
|
||
fragment AccessCredentials on AccessCredentials { | ||
accessKey | ||
secretKey | ||
bucket | ||
key | ||
sessionToken | ||
path | ||
} | ||
|
||
|
||
fragment PresignedPostCredentials on PresignedPostCredentials { | ||
xAmzAlgorithm | ||
xAmzCredential | ||
xAmzDate | ||
xAmzSignature | ||
key | ||
bucket | ||
datalayer | ||
policy | ||
store | ||
} |
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,8 @@ | ||
fragment ZarrStore on ZarrStore { | ||
id | ||
key | ||
bucket | ||
path | ||
shape | ||
dtype | ||
} |
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,12 @@ | ||
fragment DetailTrace on Trace { | ||
id | ||
name | ||
store { | ||
...ZarrStore | ||
} | ||
} | ||
|
||
fragment ListTrace on Trace { | ||
id | ||
name | ||
} |
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,13 @@ | ||
|
||
|
||
mutation RequestUpload($key: String!, $datalayer: String!) { | ||
requestUpload(input: { key: $key, datalayer: $datalayer }) { | ||
...Credentials | ||
} | ||
} | ||
|
||
mutation RequestAccess($store: ID!, $duration: Int) { | ||
requestAccess(input: { store: $store, duration: $duration }) { | ||
...AccessCredentials | ||
} | ||
} |
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,11 @@ | ||
query DetailTrace($id: ID!){ | ||
trace(id: $id){ | ||
...DetailTrace | ||
} | ||
} | ||
|
||
query Traces { | ||
traces(pagination: {limit: 10}) { | ||
...ListTrace | ||
} | ||
} |
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,9 @@ | ||
query GlobalSearch( | ||
$search: String | ||
$pagination: OffsetPaginationInput | ||
) { | ||
traces: traces(filters: { search: $search }, pagination: $pagination) | ||
{ | ||
...ListTrace | ||
} | ||
} |
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
Oops, something went wrong.