Giter Club home page Giter Club logo

apollo-federation-php's People

Contributors

emfrouin avatar jeffreybaird avatar jmauerhan avatar jpasquers avatar ldiego08 avatar maccath avatar tarekul avatar xiian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

apollo-federation-php's Issues

Adding a field with args to an EntityRefObjectType

Hi I have a product entity

new EntityRefObjectType([
                'name' => 'Product',
                'keyFields' => ['id'],
                'fields' => [
                    'id' => fn() => [
                        'description' => 'The ID of the Product.',
                        'type' => Type::nonNull(Type::int()),
                    ],
                    'accessorySlot' => fn() => [
                        'description' =>
                            'Accessory alternatives that share a product type and or fiter set and or classification',
                        'type' => $this->createConfiguratorSlotType(),
                        'resolve' => $this->productAccessorySlotResolver,
                        'args' => [ 'criteria' => [
            'name' => 'AccessorySlotCriteria',
            'description' => 'The criteria an accessory slot should satisfy.',
            'keyFields' => ['productTypeId limit classificationId filterSetId'],
            'fields' => [
                'productTypeId' => fn() => [
                    'description' => "The accessory's product type.",
                    'type' => Type::nonNull(Type::int()),
                ],
            ],
        ] ]
                    ]
                ]
            ]);

And I this field (accessorySlot) Im contributing requires extra args namely productTypeId to be resolved. I used this configuration, but it seems that the args from the accessorySlot property are not picked up in the GraphQL schema
image

Is this intended behavior or is it simply not build yet? If the latter can you point me in the right direction to contribute this feature?

Different Root Query name than 'Query' breaks federation sdl

Regarding the following line we experienced some trouble because the root of our subgraph is called RootQuery and not just Query. While this in general is no problem it is lacking some documentation. It took us quite some hours and the help of @margnusnordlander (issue) to figure this out.

Maybe this convention should be mentioned in the docs or could be dynamically adjusted to the defined query name.

if ($type->name === 'Query') {

Entities subscription

Hi,

I'm having the following issue with the library in this part of the code:

*/
private function extractEntityTypes(array $config): array
{
$resolvedTypes = TypeInfo::extractTypes($config['query']);
$entityTypes = [];
foreach ($resolvedTypes as $type) {
if ($type instanceof EntityObjectType) {
$entityTypes[$type->name] = $type;
}
}
return $entityTypes;

The issue is that the library is unable to subscribe entities that aren't returned by a query.

Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.