gorriecoe / silverstripe-menu

Adds multiple menus that are defined via yml and managed via the cms.
BSD 3-Clause "New" or "Revised" License
5 stars 18 forks source link

Latest release 1.2.0 crashes GraphQL when subtying Link dataobject #4

Closed tractorcow closed 6 years ago

tractorcow commented 6 years ago

MenuLink extends Link, but if I have another class that extends Link (but is not scaffolded) it will crash graphql.

Eg..

<?php

namespace LittleGiant\Studio\Base\DataObjects;

use gorriecoe\Link\Models\Link;

class CallToAction extends Link {}

All graphql queries now produce Type 'LittleGiantCallToAction' is not a registered GraphQL type

I think you need to shift the graphql scaffolding off the subclass and onto the Link base class to fix it.

gorriecoe commented 6 years ago

Hey @tractorcow, I have added a couple of fixes to silverstripe-link and silverstripe-menu dev-master. Could you let me know if that works?

tractorcow commented 6 years ago

Self reminder to upgrade to dev-master and recheck. :)

gorriecoe commented 6 years ago

I have released the fix as it resolves other issues as well.