Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Even more TODOs still; plus Grafserv exports #408

Merged
merged 49 commits into from
Jul 13, 2023
Merged

Conversation

benjie
Copy link
Member

@benjie benjie commented Jul 12, 2023

  • Renamed getBaseName, baseNameMatches, getOppositeBaseName and getBaseNameFromKeys inflectors to all begin with an underscore (_) - this is because these inflectors should only be used from other inflectors, since they may return non-string types (null/boolean/etc).
    • To fix, just search and replace getBaseName -> _getBaseName, etc.
  • Renamed steps from @dataplan/pg to follow the conventions:
    • BooleanFilterStep 👉 PgBooleanFilterStep
    • ClassFilterStep 👉 PgClassFilterStep
    • ManyFilterStep 👉 PgManyFilterStep
    • OrFilterStep 👉 PgOrFilterStep
    • TempTableStep 👉 PgTempTableStep
  • Moved a number of *Extensions exports from @dataplan/pg to be in global namespace DataplanPg:
    • PgCodecExtensions -> DataplanPg.PgCodecExtensions
    • PgCodecAttributeExtensions -> DataplanPg.PgCodecAttributeExtensions
    • PgCodecRelationExtensions -> DataplanPgCodecRelationExtensions
    • PgCodecRefExtensions -> DataplanPg.PgCodecRefExtensions
    • PgRefDefinitionExtensions -> DataplanPg.PgRefDefinitionExtensions
    • PgResourceExtensions -> DataplanPg.PgResourceExtensions
    • PgResourceUniqueExtensions -> DataplanPg.PgResourceUniqueExtensions
    • PgResourceParameterExtensions -> DataplanPg.PgResourceParameterExtensions
    • PgConditionStepExtensions -> DataplanPg.PgConditionStepExtensions
  • String sorting now consistently uses en-US locale
  • tamedevil export toJSON renamed to stringifyJSON (for clarity)
  • tamedevil method dangerousKey renamed to safeKeyOrThrow (for clarity)
  • @grafserv/persisted now allows configuring the poll interval of the persisted operations folder, and even adds (untested) watch mode (preset.grafserv.persistedOperationsDirectoryScanInterval = number | "watch" (number is in milliseconds, -1 to disable polling/watching))
  • Accept header parser implements more of the spec
  • Add more grafserv exports to make it easier to implement an alternative Grafserv adaptor:
    • convertErrorToErrorResult
    • convertHandlerResultToResult
    • getBodyFromRequest
    • handleErrors
    • httpError
    • makeGraphQLWSConfig
    • memo
    • normalizeRequest
    • parseGraphQLJSONBody
    • processHeaders
    • Plus types:
      • GrafservBody and underlying types in this union
      • RequestDigest
  • Grafserv error masking now generates a hash for the error (hash = sha1(String(error))) in addition to the code, this allows grouping similar errors together (there is a small risk that an extremely highly motivated hacker could use this basic hashing (using the deprecated/broken SHA1 algorithm) to determine the underlying error and stack, but doing so would be incredibly resource intensive if it's even feasible at all).
  • Fastify server stream handler rewritten
  • Detect when the user uses a preset that contains no plugins or does not contain the QueryPlugin and output an error or warning to guide them
  • Improve error messages for getOutputTypeByName and getInputTypeByName
  • Handle missing Node fetchers
  • Fix exporting of objects with a __proto__ key in graphile-export

benjie added 30 commits July 12, 2023 09:57
…teBaseName` and `getBaseNameFromKeys` inflectors to all begin with an underscore (`_`) - this is because these inflectors should only be used from other inflectors, since they may return non-string types (null/boolean/etc).
… omits the QueryPlugin, and raise an error or warning indicating to the user that there's likely an issue here.
…pare to ensure stable ordering across machines.
@benjie benjie merged commit 5bfd4bb into planning Jul 13, 2023
1 check passed
@benjie benjie deleted the even-more-todos-still branch July 13, 2023 08:21
@benjie benjie added this to the V5 beta milestone Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant