Comments (20)
graphql-hive
Where do you import from in your library?
graphql
(If you use deep imports) why do you use deep imports?
import { validateSDL } from 'graphql/validation/validate'
- as I only need to validate SDL, not buildGraphQLSchema
Would it be okay for you only import from graphql
, too?
- yes
- no
from graphql-js.
@apollo/client
Where do you import from in your library?
graphql
(If you use deep imports) why do you use deep imports?
Would it be okay for you only import from graphql
, too?
- yes
- no
from graphql-js.
graphql-tag
Where do you import from in your library?
graphql
graphql/language/ast
(If you use deep imports) why do you use deep imports?
Maybe for historical reasons, but everything we import is also exported from graphql
itself.
Would it be okay for you only import from graphql
, too?
- yes
- no
from graphql-js.
grafast
Where do you import from in your library?
graphql
graphql/jsutils/PromiseOrValue
graphql/execution/execute
graphql/type/schema
(If you use deep imports) why do you use deep imports?
graphql/jsutils/PromiseOrValue
- the type isn't exported directly, and redefining it in every file is annoying. Also, auto-import pulls it in
graphql/execution/execute
(specifically thebuildExecutionContext
function)- In order to emulate GraphQLResolveInfo as used in GraphQL resolvers, Grafast needs to get the same execution context. It also needs to coerce the variables and do all the other things that buildExecutionContext does (and isn't where Grafast adds value); so it makes sense to use the underlying function.
graphql/type/schema
- specifically the type
GraphQLSchemaNormalizedConfig
which is marked as internal but used as the return type ofschema.toConfig()
. Could be worked around viaReturnType<GraphQLSchema['toConfig']>
or similar.
- specifically the type
Would it be okay for you only import from graphql
, too?
- yes
- no
from graphql-js.
@apollo/server
Where do you import from in your library?
graphql
(If you use deep imports) why do you use deep imports?
Would it be okay for you only import from graphql
, too?
- yes
- no
from graphql-js.
graphql-yoga
Where do you import from in your library?
graphql
graphql/jsutils/Maybe
(only in tests for convenience)graphql/validation/validate
(only for test helpers)graphql/validation/ValidationContext
(for tests)
(If you use deep imports) why do you use deep imports?
See comments behind the import - we only use them in tests for testing specific features of the GraphQL server
Would it be okay for you only import from graphql
, too?
- yes (if the things are exported from the main
graphql
entry, as it would be annoying to double maintain the declarations ourself - no
from graphql-js.
@envelop/fragment-arguments
Where do you import from in your library?
graphql
graphql/language/lexer.js
graphql/language/parser.js
(If you use deep imports) why do you use deep imports?
Types for Parser and Lexer for extending and adding new functionality
Would it be okay for you only import from graphql
, too?
- yes, (if the types are explorer from the main
graphql
entry) - no
from graphql-js.
graphql-http
Where do you import from in your library?
graphql
(If you use deep imports) why do you use deep imports?
Would it be okay for you only import from graphql
, too?
- yes
- no
from graphql-js.
graphql-sse
Where do you import from in your library?
graphql
(If you use deep imports) why do you use deep imports?
Would it be okay for you only import from graphql
, too?
- yes
- no
from graphql-js.
graphql-ws
Where do you import from in your library?
graphql
(If you use deep imports) why do you use deep imports?
Would it be okay for you only import from graphql
, too?
- yes
- no
from graphql-js.
graphql-codegen
Where do you import from in your library?
graphql
(If you use deep imports) why do you use deep imports?
Would it be okay for you only import from graphql
, too?
- yes
- no
from graphql-js.
@apollo/composition
Where do you import from in your library?
graphql
(If you use deep imports) why do you use deep imports?
N/A
Would it be okay for you only import from graphql
, too?
- yes
- no
from graphql-js.
@apollo/federation-internals
Where do you import from in your library?
graphql
graphql/jsutils/Maybe
graphql/validation/validate
graphql/validation/ValidationContext
graphql/validation/specifiedRules
(If you use deep imports) why do you use deep imports?
Used for SDL validations.
Would it be okay for you only import from graphql
, too?
- yes (assuming those validations are re-exported from root
graphql
entry) - no
from graphql-js.
@apollo/gateway
Where do you import from in your library?
graphql
graphql/execution/values
(If you use deep imports) why do you use deep imports?
Use getVariableValues
while parsing the request.
Would it be okay for you only import from graphql
, too?
- yes
- no
from graphql-js.
@apollo/query-planner
Where do you import from in your library?
graphql
(If you use deep imports) why do you use deep imports?
N/A
Would it be okay for you only import from graphql
, too?
- yes
- no
from graphql-js.
@apollo/subgraph
Where do you import from in your library?
graphql
graphql/validation
graphql/validation/validate
graphql/validation/ValidationContext
graphql/validation/specifiedRules
graphql/jsutils/PromiseOrValue
(If you use deep imports) why do you use deep imports?
Used for SDL validations.
Would it be okay for you only import from graphql
, too?
- yes (assuming those validations are re-exported from root
graphql
entry) - no
from graphql-js.
Thanks @phryneas I just pushed a fix that removed deep imports wherever I can. The following is up to date with that.
graphql-request
Where do you import from in your library?
import { ... } from 'graphql'
import { type ObjMap } from 'graphql/jsutils/ObjMap.js'
(If you use deep imports) why do you use deep imports?
To access ObjMap
which is the type of some data structures exposed by graphql
library.
Would it be okay for you only import from graphql
, too?
- yes [1]
- no
[1] Except for ObjMap
type which is currently not exported from graphql
. Worst case I could copy the type into my package.
from graphql-js.
apollo-ios
Where do you import from in your library?
graphql
graphql/validation/validate
graphql/language/ast
(If you use deep imports) why do you use deep imports?
To access validateSDL
(validation) and isNode
(ast)
Would it be okay for you only import from graphql
, too?
- yes
- no
from graphql-js.
graphql-box
Where do you import from in your library?
graphql
graphql/jsutils/PromiseOrValue
(If you use deep imports) why do you use deep imports?
Would it be okay for you only import from graphql
, too?
- yes
- no
from graphql-js.
A new library I'm working on needs isNode
to be exported (currently imported from graphql/language/ast
).
from graphql-js.
Related Issues (20)
- Tutorial data HOT 2
- astFromValue fails with a custom scalar serializing to an object value HOT 5
- In a response to a query about an Issue, the URL and other info is missing for links created with Reference editor button HOT 5
- author/committer -> user fields returning NULL for commits committed by user
- [email protected]
- npm link with graphql package breaks application HOT 2
- IHeyReally.com HOT 1
- Can I ask what is the progress here? Is there a solution being worked on? Do we have some timeline? Or progress with issue? Thanks!
- IHeyReally.com
- Typescript error with 16.9.0 (re ThunkObjMap) HOT 3
- Notice: default branch is now `16.x.x` HOT 3
- <a href="https://api.easycla.lfx.linuxfoundation.org/v2/repository-provider/github/sign/12261526/38307428/4135/#/?version=2"><img src="https://s3.amazonaws.com/cla-project-logo-prod/cla-not-signed.svg" alt="CLA Not Signed" align="left" height="28" width="328"></a><br/><br /><ul><li><a href='https://api.easycla.lfx.linuxfoundation.org/v2/repository-provider/github/sign/12261526/38307428/4135/#/?version=2' target='_blank'>:x:</a> - login: @Heyitsquoracom / name: [email protected] . The commit (b6081f914f0c5c22ee48d26aff4b473bf17627ce) is not authorized under a signed CLA. <a href='https://api.easycla.lfx.linuxfoundation.org/v2/repository-provider/github/sign/12261526/38307428/4135/#/?version=2' target='_blank'>Please click here to be authorized</a>. For further assistance with EasyCLA, <a href='https://jira.linuxfoundation.org/servicedesk/customer/portal/4' target='_blank'>please submit a support request ticket</a>.</li></ul><!-- Date Modified: 2024-06-28 04:40:51.630768 -->
- Error with version v16.9.0: `Can't resolve '@apollo/subgraph/dist/directives''` HOT 1
- Type is incorrect in graphql ExecutionResult with new type GraphQLFormattedError HOT 1
- [email protected]
- Allow to call `resolveType` outside of `execute` context HOT 1
- Add Query to Fetch All Messages HOT 2
- canary builds are broken HOT 2
- 4D array non optionality error on introspection HOT 1
- `UniqueInputFieldNamesRule` incorrectly identifies field names as duplicates within `and/or` array
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 graphql-js.