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

[FE-2750][FE-2763] Dead simple steel thread and test setup. #1

Merged
merged 3 commits into from
Oct 12, 2022

Conversation

cleve-fauna
Copy link
Contributor

@cleve-fauna cleve-fauna commented Oct 7, 2022

Ticket(s): FE-2763

Notes

This is a start to bootstrap the project. Lots out of scope here. See out of scope section.

There's a few empty files + a notes.md in here that can be ignored. This is my chicken-scratch areas.

Problem

  • Standup FQL-x driver project for development.
  • Get a basic steel thread.
  • Get a start on some primitives we want to support:
    • extensible set of endpoints
    • extensible client configuration
    • clear support for local development
  • optional typescript interfaces for consumers

Solution

Interfaces over Types

Defined a set of interfaces (rather than types) as a starting point for this project. Interfaces were chosen as they are "open". That is a customer can reopen our definition and add their own extensions.

For example, imagine a customer with a customer with a private region group (🤞 🤜 🪵 ). They will have a unique endpoint. Via an interface they can extend the Endpoints to be:

interface Endpoints {
  myPRG: new URL("whatever");
}

and still have access to classic, eu-std and us-std.

This will at least be useful internally as we can extend the Endpoints to be preview and dev aware.

Local Development

  • Included local straight away in endpoints to encourage custoemrs to lean into local development.
  • Setup a local container for testing that is enabled with fql-x.
  • will build on this.

Typescript options

  • Began defining types customers can use or extend, if they wish to go the typescript route.

Result

  • Basic steel thread to get this project going.

Out of scope

This commit is just a bootstrapping and POC of the setup; so pretty much everything 😛 is out of scope.

Not limited to:

  • documentation
  • "settling" on this approach - looking for feedback / discussion here
  • connection pooling
  • wire protocol smarts
  • handling "void" results
  • supporting all the advances in the language such as interpolation
  • supporting all the error types
  • etc etc
  • really just going for basic steel thread here to bootstrap the project.

Testing

To test locally pull down this repo. Then run:

yarn fauna-local
... wait a bit for it to start (I'll add some auto-health checking via docker or something else later)
yarn test

freels
freels previously requested changes Oct 11, 2022
Copy link
Member

@freels freels left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

look ma, I'm reviewing JS code!

seems good to me aside from a few minor things.

src/index.ts Outdated Show resolved Hide resolved
src/index.ts Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
freels
freels previously approved these changes Oct 11, 2022
henryfauna
henryfauna previously approved these changes Oct 12, 2022
@cleve-fauna cleve-fauna merged commit 14201ce into main Oct 12, 2022
@cleve-fauna cleve-fauna deleted the main_simplePoc branch October 12, 2022 17:04
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.

3 participants