Skip to content

Conversation

captbaritone
Copy link
Owner

@captbaritone captbaritone commented Dec 30, 2023

Fixes #66

TODO

  • Rename args in @-exports directive to be more generic
  • Clean up codegen
  • Check/fix integration tests
    • Test all serialization/deserialization validation failure cases
  • Add unit test validating the error you get when you don't export your type
  • Revisit docs

Copy link

netlify bot commented Dec 30, 2023

Deploy Preview for grats ready!

Name Link
🔨 Latest commit 49597cb
🔍 Latest deploy log https://app.netlify.com/sites/grats/deploys/658fdd291f6e0e000805a8bf
😎 Deploy Preview https://deploy-preview-94--grats.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

const abs = resolveRelativePath(module);
const relative = stripExt(
path.relative(path.dirname(this._destination), abs),
);
Copy link
Owner Author

Choose a reason for hiding this comment

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

TODO: Extract this so it can be shared

),
name,
);
if (name === "serialize") {
Copy link
Owner Author

Choose a reason for hiding this comment

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

TODO: Comment explaining why we do this

}
}

function fieldDirective(
Copy link
Owner Author

Choose a reason for hiding this comment

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

TODO: Rename?

}

scalar MyUrl
scalar MyUrl @exported(tsModulePath: "grats/src/tests/fixtures/custom_scalars/DefineCustomScalar.ts", functionName: "MyUrl", argCount: 0)
Copy link
Owner Author

Choose a reason for hiding this comment

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

TODO: Rename functionName to something more generic.
TODO: Make argCount optional?

-----------------
{
"data": {
"echo": null, // TODO: That's not write
Copy link
Owner Author

Choose a reason for hiding this comment

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

TODO: Look into these todos

const schemaModule = await import(schemaPath);

const actualSchema = schemaModule.getSchema();
const actualSchema = schemaModule.getSchema(server.config);
Copy link
Owner Author

Choose a reason for hiding this comment

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

Nice.

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.

Needed: Mechanism for defining serialize/deserialize functions for custom scalars

1 participant