Comments (7)
I'll try to find some time to work on this next week
from pothos.
Building a schema requires all types to be defined using the same builder instance, but you can split that actual definitions into multiple files.
There are some tips on ways you can structure your app in https://giraphql.com/guide/app-layout
For concrete examples there are example apps in the test directory for each package you could look at (only a few of these split things I to many files). Eg https://github.com/hayes/giraphql/tree/main/packages/core/tests/examples/giraffes
For questions, I don't currently have a discord, for now I would recommend https://github.com/hayes/giraphql/discussions
from pothos.
Unfortunately there isn't a great way to do this right now. It should be pretty easy to add though. I think to support this I would need to add 2 things: a way to add fields to all connection objects, and a way to extend the type for connections so that a connection resolver can be expected to return objects with additional properties.
from pothos.
Thanks! I appreciate the quick response.
On a somewhat related topic (I can open a separate PR if you wish), is there an example or documentation of splitting up the builder across multiple files. I can only get the schema to load when all my builder calls come from an instance initialized in the same file. Or a discord where I could ask questions?
from pothos.
Thanks! The example helped. The difference was importing the entirety of the file instead of just exports -- ie,
import "./person"
NOT import * from './person'
from pothos.
PR: https://github.com/hayes/giraphql/pull/68/files
from pothos.
published as
- @giraphql/deno => 2.3.0
- @giraphql/plugin-dataloader => 2.2.3
- @giraphql/plugin-relay => 2.3.0
docs: https://giraphql.com/plugins/relay#extending-all-connections
from pothos.
Related Issues (20)
- Prisma `t.relatedConnection` Failing to Throw Typing Errors HOT 2
- Authz Plugin overwrites the directives plugin HOT 4
- Question: How to use t.connection to behave like t.relatedConnection HOT 3
- Indirect prisma relations has type errors. HOT 3
- Can prismaConnectionHelpers provide totalCount field? HOT 2
- Sentry tracing not showing the field name in description HOT 1
- Setting auth scope based on a returned type HOT 2
- Prisma plugin failing on call to builder.prismaObject() HOT 7
- `withAuth` and `authScopes` don't combine HOT 2
- Argument of type 'string' is not assignable to parameter of type 'never' HOT 2
- Pothos subscriptionField + withFilter are breaking the type inference of subscription arguments HOT 5
- How to support HMR with Pothos HOT 2
- loadableGroup load/group seems to infer the wrong type HOT 2
- Please review this pr adding progressive override to your federation plugin
- Prisma generator generate wrong imports when using ESM HOT 2
- Pitfall when calling a schema locally from another schema using auth scopes
- [Suggestion] SubGraph-specific context type with subgraph plugin HOT 1
- Make possible to check type of a InputFieldRef during runtime HOT 3
- How do I use relayMutationField & authField/withAuth work together? HOT 2
- Draft new release for `@pothos/tracing-sentry` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pothos.