Allow wildcard fields in FragmentReplacement
See original GitHub issueAssuming I have the following GraphQL type:
type AudioListen implements Activity {
id: ID!
user: User!
audio: Audio!
}
I’d like to be able to add a wildcard FragmentReplacement
export const fragmentReplacements: FragmentReplacement[] = [
{
field: '*',
fragment: '... on AudioListen { user { id } }',
},
];
So that the user ID is always fetched if any of the fields are fetched.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top Results From Across the Web
Find strings within strings faster with the new wildcard field
In Elasticsearch 7.9, we'll be introducing a new “wildcard” field type optimised for quickly finding patterns inside string values.
Read more >Query all fields of a type in a simple expression [wildcard] #127
Let us say this is the type : type Human { id: String name: String homePlanet: String } Then to query all the...
Read more >Elasticsearch - Highlight of Wildcard Search - Stack Overflow
Pure wildcards \* are rewritten to exists queries for efficiency. As a consequence, the wildcard "field:*" would match documents with an ...
Read more >SQL Server: Replace with wildcards?
The REPLACE built-in function does not support patterns or wildcards; only LIKE and PATINDEX do. Assuming that you really just want the ...
Read more >Wildcards in Java - GeeksforGeeks
The wildcard can be used in a variety of situations such as the type of a parameter, field, or local variable; sometimes as...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Each rule accepts a
fragment
option that you may use to specify which fields it relies on. Based on where you use the rule,graphql-shield
will generate the fragment replacement that you later forward to server.Check out the docs here
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.