Projects STRLCPY graphql-engine Commits c53aa650
🤬
  • server: fix a leak in schema construction for role

    introspection data from 'result' is retained unnecessarily for
    non-admin roles where we just need the validation effect.
    
    live_bytes -6% for huge_schemaa
    
    Also force remoteSchemaErrors, though I don't know if this has any
    performance effect
    
    GitOrigin-RevId: ac41019b309043065b176f99606c316523f53f00
  • Loading...
  • Brandon Simmons committed with hasura-bot 2 months ago
    c53aa650
    1 parent 5b4b8527
  • ■ ■ ■ ■ ■ ■
    server/src-lib/Hasura/GraphQL/Schema.hs
    skipped 205 lines
    206 206   
    207 207   -- build all remote schemas
    208 208   -- we only keep the ones that don't result in a name conflict
    209  - (remoteSchemaFields, remoteSchemaErrors) <-
     209 + (remoteSchemaFields, !remoteSchemaErrors) <-
    210 210   runRemoteSchema schemaContext schemaOptions $
    211 211   buildAndValidateRemoteSchemas remotes sourcesQueryFields sourcesMutationBackendFields role remoteSchemaPermsCtx
    212 212   let remotesQueryFields = concatMap piQuery remoteSchemaFields
    skipped 26 lines
    239 239   -- required for introspection, which ends up doing a few correctness
    240 240   -- checks in the GraphQL schema. Furthermore, we want to persist this
    241 241   -- information in the case of the admin role.
    242  - introspectionSchema <- do
     242 + !introspectionSchema <- do
    243 243   result <-
    244 244   throwOnConflictingDefinitions $
    245 245   convertToSchemaIntrospection
    skipped 726 lines
Please wait...
Page is in error, reload to recover