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

Restructure graphql modules #307

Merged
merged 8 commits into from
Mar 21, 2023
Merged

Restructure graphql modules #307

merged 8 commits into from
Mar 21, 2023

Conversation

sandreae
Copy link
Member

@sandreae sandreae commented Mar 21, 2023

Moved modules and methods around in graphql so they better reflect the design patterns we're following. Now things look like:

├── constants.rs
├── mod.rs
├── mutations
│   ├── mod.rs
│   └── publish.rs
├── queries
│   ├── all_documents.rs
│   ├── document.rs
│   ├── mod.rs
│   └── next_args.rs
├── scalars
│   ├── document_id_scalar.rs
│   ├── document_view_id_scalar.rs
│   ├── encoded_entry_scalar.rs
│   ├── encoded_operation_scalar.rs
│   ├── entry_hash_scalar.rs
│   ├── log_id_scalar.rs
│   ├── mod.rs
│   ├── public_key_scalar.rs
│   └── seq_num_scalar.rs
├── schema.rs
├── tests.rs
├── types
│   ├── document_fields.rs
│   ├── document_meta.rs
│   ├── document.rs
│   ├── mod.rs
│   └── next_arguments.rs
└── utils.rs

Also moved dynamic schema build and resolve methods onto "empty" structs representing graphql types cos it makes the api quite nice.

Naming is still not quite there, especially whether the types should be called document_x or schema_x, but I will tackle that incrementally over the next few PRs.

📋 Checklist

  • Add tests that cover your changes
  • Add this PR to the Unreleased section in CHANGELOG.md
  • Link this PR to any issues it closes
  • New files contain a SPDX license header

@sandreae sandreae marked this pull request as ready for review March 21, 2023 14:31
@adzialocha adzialocha merged commit 4d6ad2f into main Mar 21, 2023
@adzialocha adzialocha deleted the reorganise-graphql-modules branch March 22, 2023 11:32
adzialocha added a commit that referenced this pull request Mar 28, 2023
* main:
  Create and validate abstract queries (#302)
  Handle null value for viewId in nextArgs
  Introduce `identify` and `rendezvous` network protocols (#304)
  Restructure graphql modules (#307)
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

2 participants