Files
speckle-server/packages/frontend/src/graphql/server.js
T
Iain Sproat 90847e422d Feat: configurable file limits (#835)
* Feat: configurable file limits

* ci(circleci): container build speed imporvements

* feat(frontend nginx): add file size limit configurability to frontend nginx

* feat(server blobstorage): use the new file size limit customization value

* feat(helm chart): implement the file size configuration in the helm chart

* fix(frontend docker): fix entrypoint script

* fix(server blobstorage): fix env var parsing NaN

* feat(fileimport-service): add customizable import timeout

* feat(helm chart): add fileimport service timeout value to helm chart

* feat(blobstorage): add server side blob storage size limits

* feat(docker-compose): add blob size limit env var to  docker-compose files

* refactor(frontend file uploads): refactor file uploads to use `useQuery`

* refactor(server env helper): move env helper to shared module

* refactor(blobstorage): use env helper for file size limit

* refactor(frontend file uploads): use generated query document

* fix(server blob sotrage): fix file size limit function call

Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
2022-07-29 12:00:29 +02:00

78 lines
1.4 KiB
JavaScript

import { gql } from '@apollo/client/core'
export const serverInfoBlobSizeFragment = gql`
fragment ServerInfoBlobSizeFields on ServerInfo {
blobSizeLimitBytes
}
`
export const mainServerInfoFieldsFragment = gql`
fragment MainServerInfoFields on ServerInfo {
name
company
description
adminContact
canonicalUrl
termsOfService
inviteOnly
version
}
`
export const serverInfoRolesFieldsFragment = gql`
fragment ServerInfoRolesFields on ServerInfo {
roles {
name
description
resourceTarget
}
}
`
export const serverInfoScopesFieldsFragment = gql`
fragment ServerInfoScopesFields on ServerInfo {
scopes {
name
description
}
}
`
/**
* Get main server info
*/
export const mainServerInfoQuery = gql`
query MainServerInfo {
serverInfo {
...MainServerInfoFields
}
}
${mainServerInfoFieldsFragment}
`
export const fullServerInfoQuery = gql`
query FullServerInfo {
serverInfo {
...MainServerInfoFields
...ServerInfoRolesFields
...ServerInfoScopesFields
...ServerInfoBlobSizeFields
}
}
${mainServerInfoFieldsFragment}
${serverInfoRolesFieldsFragment}
${serverInfoScopesFieldsFragment}
${serverInfoBlobSizeFragment}
`
export const serverInfoBlobSizeLimitQuery = gql`
query ServerInfoBlobSizeLimit {
serverInfo {
...ServerInfoBlobSizeFields
}
}
${serverInfoBlobSizeFragment}
`